Macro - Filter By Scheme

Feb 24, 2012

I have an open form. In that form I want a control to do a macro. The task is the following events:

Home>Advanced>Filter by scheme.

The first event in the macro should be to empty the form.

View Replies


ADVERTISEMENT

Queries :: Building Rating Scheme Query?

Jul 8, 2014

I currently have 2 tables in a database that I'm trying to build a query off of. The first table lists personnel & their position #s, and the second table has a column for "rated person", "rater", "senior rater" and "reviewer" which are all part of our annual evaluations. I'm trying to program the query to display the names of the person attached to a position #, but can only get the query to return the actual position #s.

I'm using the table to assign each position # appropriately, i.e. position # 10202 is rated by 10103 and senior rated by 10101; I do this with the lookup data type. Once each position # is assigned, I'd like the query to display the name of the personnel instead of the position #, i.e. when queried, it would return under the rater column JOHN SMITH instead of 10202, and in the senior rater column JOHN JONES instead of 10103, etc.

View 1 Replies View Related

Macro To Auto Filter - Show Records With Same Code

Jun 14, 2012

I have a form that has numerous fields, there is one field that is called the "Relationship Code" it gives any customers who have a certain relationship a 3 digit number. I would like a command button that you can press that will take the current record shown and filter their relationship code, to only show those records who have the same code. I know this can be done by going to the field>right clicking>and saying Equals " ". But I want a button with code that will do this automatically.

View 1 Replies View Related

Creating An Update Database For A Loyalty Points Scheme

Feb 5, 2008

hi i want to create a loyalty points scheme though a database,
general rulse apply 1 point per £1,

when the customer spens some money the staff then go to the machine and input the relevent data.

then a statment will be printed out for that customer with the points to date, and thier purchase the amount of point collect with the new total.

To search the full name and postcode would be adiquit as the printed statment could be lost and so could the customer id get confused by the customer.

for the report the layout would look like this:
eg

customer ID
cathy smith
e-mail,
address,
postal code,

02/12/2007 points to date 200
05/01/2008 puchase made £30.00
05/01/2008 new points total 230

if they use points it would look like

02/12/2007 points to date 200
05/01/2008 puchase made £30.00
05/01/2008 points use 125
05/01/2008new points total 100

point can be enterd manually and removed manually as customers want to save like a saving scheme

please help me with is as i have no idea where to start and if it posible, and limited knoledge of access

thanks in advance

View 4 Replies View Related

Forms :: Macro To Apply Filter - Search Multiple Fields

May 9, 2013

I'm trying to implement a macro to filter through accidents to see if my company has already been hired on a particular case.

In the first form the user enters the date, location, and last name of one of the drivers. Then they click a button which opens a new form as a datasheet with accidents that match ANY of the three controls. Evidently, I need a filter that contains some form of a series of OR operators.

However, whenever I try any variation of a button that opens the second form and then applies the filter, I always get no matches.

View 12 Replies View Related

Forms :: Number Of Buttons Which Open Other Forms And Filter Results Using Embedded Macro

Apr 6, 2015

I have a bit of a problem with a database in Access 2013. On 1 of the forms, I have a number of buttons which open other forms and filter the results using an embedded macro. All has been well until a few days ago when error 2950 pop up box started appearing. After fiddling around for a while it all works OK (without actually changing anything) until next time the database is opened. I checked to make sure the location is "trusted" and all seems OK.

View 4 Replies View Related

Modules & VBA :: Write A More Complex Macro That Will Start Another Macro At Preset Time

Dec 8, 2013

I am trying to write a more complex macro that will start another macro at a preset time, however I am getting stopped at the first hurdle - getting a macro to run another macro.

Here is the code i am using at the moment, all I want to do currently is click the first button, then get the second macro to execute. But no luck, getting error 2157 "cannot find the procedure"

Code:
Private Sub Command3_Click()
MsgBox "1st macro running", vbExclamation, "Note"
Application.Run "teststart1"
' Application.OnTime TimeValue("19:55:00"), "teststart1"

[code]....

View 1 Replies View Related

Modules & VBA :: Filter Records - Adding Unbound Date Listbox To Filter String

Feb 10, 2014

I'm trying to hash two scripts I've found into 1 functioning filter, however I'm still relatively new to vba and can't figure out how to get this working.

I'm trying to use Allen Browne's Search Criteria:

with another snippete of code I found here:

Code:
'Purpose: This module illustrates how to create a search form, _
where the user can enter as many or few criteria as they wish, _
and results are shown one per line.

[Code]....

It's the date part I'm having trouble with, the rest of the search criteria work fine without the date, but I can't get it working when I try to modify and merge the date sections of each code.

Also I'm using a listbox for the "Yesterday";"Last 4 days";"Last 9 days" and not a combo box.

View 2 Replies View Related

Forms :: Command Button - Set A Default Filter And Filter On Load

Aug 13, 2014

I have a continuous form based on table "INCOMES" that shows all the payments received, which mediums can be (field "PMNT_MEDIUM"):

- check
- transfer
- taxes
- cash

Table "INCOMES" is filled using another form, but in this particular form I just want to show "check", "transfer" and "cash" (not "taxes") so that I can track all the cash incomes.

Note: taxes are loaded because they appear in my invoices and I need them there to reach the invoice total amount.So my form has a search bar which allows me to search by PMNT_MEDIUM listing all "checks", all "cash" or all "transfer". I can also search by payment number (meaning: check number). To that end I have a "search" button that applies the filter. And I have another button that "cleans" the filtering by "putting a "" in the search-bar and then calling the "on click" of the search button".

What I need is, no matter if I click over the "search" or "clean" button, it NEVER shows me the "taxes".Search button, on click code:

If IsNumeric(Me.busq_chq_med) Then
Me.Filter = "[PMNT_MEDIUM_NUMB] =" & Me.SEARCH_BAR
Else
Me.Filter = "[PMNT_MEDIUM] like'" & Me.SEARCH_BAR & "*'"
Me.Filter = "[PMNT_MEDIUM] like'" & Me.SEARCH_BAR & "*' or [INVOICE] like'" & Me.SEARCH_BAR & "*'"
End If
Me.FilterOn = True

Clean filter button, on click code:

[SEARCH_BAR] = ""
Call [Search button]_click
Me.Filter = "[PMNT_MEDIUM] like'" & Me.SEARCH_BAR & "*'"
Me.FilterOn = True

View 14 Replies View Related

Forms :: Dynamic Filter With Multiple Possible Filter Criteria

Jan 26, 2015

I have a form that is showing data from 1 table. That table has 12 different fields on it and I want to be able to filter based on selections I make in a combo box in the header of the form. The filter string must be dynamic enough to allow filtering based on 1 criteria selected, or multiple criteria selected. For example:

If I have values in filter fields 3, 5, and 9 I'd want the filter string to be created as follows:

"...WHERE field3 = field3filter.value AND field5 = field5filter.value AND field9 = field9filter.value"

If I have values in only field 7, I'd want th efilter string to be created as follows:

"...WHERE field7 = field7filter.value"

And so on and so on.

I have created some filters before but all of the different VBA syntaxes I'm using seem to come up short.

View 5 Replies View Related

How To Create Filter Button On Form And Filter Records

Nov 26, 2012

How can I create a "Filter Button" on a form and filter my records? I create a textbox on a form and a filter button on the right. Then I click the filter futton, the filter function will search/match the content in the box through the datasheet. And then the results of the filtering will be pop up on the split form datasheet.

View 3 Replies View Related

Filter A Report USING A Forms Filter Results

Oct 25, 2006

I am using MS Acess2000 and need to make a report that will be passed around with production work. My primary key is the invoice number of the work order. Currently to open an invoice i have a macro, attached to a query with the following qualifiers; Like [Enter invoice]

This pulls up the current record fine.
for the form and flags the folloing in the property filter sectin of the form

(((([CustomerTableMasterRef].[Invoice]) Like [Enter invoice])))

PART 2

Now I am trying to use microsofts how to filter a report using a forms filter...
This picks up on the Invoice query as shown above but does not just insert the query results...

Is there better code or another way to approach this... Currently i am using:

Name:cmdOpenReport
Caption: Open Report
OnClick: [Event Procedure]

Private Sub CmdOpenReport_Click()
If Me.Filter = "" Then
MsgBox "Open an Invoice First"
Else
DoCmd.OpenReport "rptCustomers", acViewPreview, , Me.Filter
End If
End Sub

Using this code not only does my report not detect the correct fields to import data (no data is filled in) but it requerys the invoice or atleast should, which I could do with out all of that code...

Where should i go from here?

View 1 Replies View Related

Forms :: Filter Button On Form As Filter

Aug 1, 2013

I have placed a filter button on a form as a filter and written the following on-click event procedure:

DoCmd.SetWarnings False
DoCmd.RunCommand acCmdApplyFilterSort
Me.Filter = "ACCOUNT_DO_NOT_EMAIL = 'HS'"
Me.FilterOn = True

When I click the filter button I get a blank message box titled 'Microsoft Access" and an OK button, when closed the filter works perfectly.I have checked this procedure in other forms and it works without showing the blank message box.The only difference with this form is that its control source is a union query.

View 10 Replies View Related

Why Does AND Filter Also Filter NULL

Nov 24, 2006

Hello Everyone,Been a while since I needed to post on this forum, but I found something rather disturbing today; either that or I have missed something obvious. I have a large query of financial data, and I filter out certain codes which I don't want to include. The filter is;<>"BL01" And <>"SS01"Which works as it should, filtering out all BL01 and SS01. However, it also filters out any NULL values, which is something I would not expect it to do. When I enter NULL as a filter, I get the records I expect. What am I doing wrong here? I am using Access 2003 SP3 on Windows XP Service Pack 2

View 4 Replies View Related

Run A Macro On First Use.

Dec 5, 2005

Hi.
I have a macro (that runs a bat file) that I would like to run for the first time ,and only the first time that a form is run. The bat file will then copy over certain files the db needs.
Is this possible?

Thanks.

Frank.

View 1 Replies View Related

Macro

May 19, 2005

I have a database and in order to get the correct values you need to run a few queries/make tables/delete tables ect. I was wondering if there was a way to code something so that on command click button it would run through all the neccessary steps so people dont have to manually do this.

View 1 Replies View Related

Do I Need A Macro For This? If So, How?

Mar 31, 2006

Hi,

Here's a sample of the database that I'm working on. I'm trying to help teachers take attendance of all of their students and so have the following tables.

tblAdmin - List of Teachers and their IDs
tblAttendance - Courses, Student IDs, the Date and the Status (tardy, etc..)
tblCourseInfo - List of Courses and the Teachers teaching the course
tblEnrollment - List of the Courses and the students enrolled in them
tblStudents - Student IDs and their names

The form that I want is a "Course Information Form" that will

(1) Display all the students enrolled in their course
(2) Allow the teachers to take attendance everyday while keeping all the previous records

I've attached my sample database. I really appreciate ANY help any of you can suggest.

Thanks :)

View 13 Replies View Related

Macro

Feb 27, 2006

I am running a Macro that is running 3 query and saving inbetween each query.
My issue is that when the macro runs I have to hit ok when the message boxes pop up saying "its about the run a Query" and then again when it says "your about to update the records". These two messages occur for each query and save. So I have to hit OK 6 times

Is there a way I can set the macro to NOT show these message boxes?

THanks in Advance

View 9 Replies View Related

Macro Problem

May 2, 2006

Hi all,

I usually search for the answers to my problems, but as im not sure what the problem is i havnt been able to do so here.

Basically i have a pretty simple database, it works fine in the UK. The company i have designed it for are moving to Budapest, i have just had an email this morning saying an error message pops up when the try using a form, i have attached the message. The macro just runs a query based on a table in the database asking the users to choose a record number edit. Im assuming it must be something to do with is being used in Budapest as it works fine here, but they are accessing it the same as they would do here, just from a different location.

Any help would be appreciated, thanks

View 5 Replies View Related

Autokeys Macro

Dec 2, 2006

I use an autokeys macro to allow users to openforms with a hotkey directly without going through the menu system.

I would like the users to be able to modify their own setttings for this, but I could not find a way of writing to the macro autokey table.

Anyone know of a way?

View 4 Replies View Related

The Macro Can Not Run In Some Computers

Jul 30, 2007

I have a program thats work perfectly in some computers useing the network but when i try to open it in other computers i get an error and when i try to debug the error it highlit the line that i am calling the micro that open the mainform in it, i hope some one have an idea for what is going on with the program

View 12 Replies View Related

Macro In Access

Dec 3, 2007

Hi,

Task: to extract data from table 1 of a database (tied to form 1) to create a record in another table 2 of the same database (tied to form 2).
Besides, I need to make it simple to use for an end user.
On the form 2 I have a command button that activates macro. Macro makes a query to run and extract data from table 1 and append a table 2.
Now I want the user to see the record on the screen (form 2) that has just been created. For that purpose I add "go to last record" step in the macro.

Problem: that doesn't work. :) For some reason it brings back same record from the middle of the table which is not the last. And what is even more interesting is that it doesn't tie to the record ID on the bottom of the screen (access generated).

Challenge: the record ID field in the table 2 is a primary key auto-numbered field (i know this is not perfect but I am not the one who created the database) and some records have been deleted over time. Might that be connected to that or that is something else?
Thank you!!

View 1 Replies View Related

Programming With Macro

Jan 11, 2008

I have inserted two combo box in the form with lookup in the table. Now I want to select values in these boxes and filter the records having those values on click of a command button placed on the form.

How can it be done without using VBA? Is it possible with use of macro?

Kindly guide.

View 2 Replies View Related

Need Help Finishing A Macro

Mar 25, 2008

I hope you might be able to help.

I've managed to successfully setup my first Access database.

I have imported data from Microsoft Excel into an Access Database and Table within that (EmptyHomesTable).

The data relates to empty properties and every month at work we receive a list of empty homes in the month. Every month, this new data will be imported into a TemporaryImportTable.

I am then running an update query to compare the data in the EmptyHomesTable with TemporaryImportTable and 'close' those which are no longer empty (i.e. update their status in the EmptyHomesTable if the account reference number doesn’t match).

I am then running an append query to compare the data in the EmptyHomesTable with the TemporaryImportTable and add any new empty properties (i.e. add those which aren’t in the EmptyHomesTable by looking at the account reference numbers and adding them if they don’t match).

This gives us a working database of empty properties but doesn't delete those which are no longer empty (rather they are marked as closed).

What I'm trying to do is to run a Macro to automate all of this on a monthly basis.

Macro is as follows:

1. Delete Query to delete the data in the TemporaryImportTable but keep the table structure;
2. TransferSpreadsheet to import the latest Microsoft Excel file into TemporaryImportTable;
3. Update Query to close properties which are no longer empty in EmptyHomesTable;
4. Append Query to import those new empty properties in EmptyHomesTable;

The macro almost runs fine but I have a couple of questions to help finish it:

a).I’ve run the macro to update the February list to the January list which works fine. Running the macro to update the January and February list (combined) is almost fine but I’m 2 entries out. I can’t manually check as we’re talking about 1,500 entries. Is there another way?

b). Is there any way for the TransferSpreadsheet query to ask at each time of running the macro for the location of the Excel spreadsheet or do I need to go into the macro every time and change the file location?

c). One of the fields in the table is empty date (i.e. the date the property became empty). Is there a quick way to filter the entries before a certain date (i.e. only show those empty before 30 September 2007 for example)?

Thanks for your help.

View 3 Replies View Related

Macro Writing

May 17, 2005

Hello,

I have a procedure which I undertake and wonder whether it can be automated in any way.

I have a field on a form for Purchases (frmPurchases) for a Purchase Order number. To get the order, I click on a command (cmdpo) which opens another form and clicking a command on this form (cmdgetpono) produces a unique Purchase Order number. I then manually copy the number given and paste it into the field on frmPurchases (PONo).

I have not used Macros before but cannot see that there are the options to achieve this. If someone could suggest the ones I should uses fro the list it would be appreciates.

Alternatively, is there another way of looking at this?

Thank you

Lin

View 2 Replies View Related

Msg Box Before Macro Start

Dec 14, 2005

Hello,

I have a button that runs a macro to delete records in 12 tables. I want to create a message box before that macro runs warning that you are deleting records in 12 tables and are your sure you want to run the macro.

I need a message box with an ok and cancel button. Where do I put the msgbox funtion in this code?

Thanks !!

This is my code:

Private Sub cmdRunDeleteMacro_Click()
On Error GoTo Err_cmdRunDeleteMacro_Click

Dim stDocName As String

stDocName = "mcrSemesterStartRecordDELETE"
DoCmd.RunMacro stDocName

Exit_cmdRunDeleteMacro_Click:
Exit Sub

Err_cmdRunDeleteMacro_Click:
MsgBox Err.Description
Resume Exit_cmdRunDeleteMacro_Click

End Sub

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved