Check data in form to trigger another form

MrMitch

Registered User.
Local time
Yesterday, 19:42
Joined
Oct 19, 2007
Messages
50
Hi,

I am looking for a way in Access 2007 to have a button on one of my forms, when it it clicked on, look to check data in one field, and to open another form based on what data is entered.

Hope that is clear enough. Please let me know if you need any more information. Thanks a lot!
 
Build the macro with a condition that states the criteria you need to check. example:

Condition Action

forms!formname.formvalue<1 OpenForm
forms!formname.formvalue>1 OpenForm

Then set the OnClick event to run this macro.
 
A little more clear

Build the macro with a condition that states the criteria you need to check. example:

Code:
Condition                                       Action             Argument

forms!formname.formvalue<1                   OpenForm            formname1
forms!formname.formvalue>1                   OpenForm            formname2

Then set the OnClick event to run this macro.
 
Thanks for your help. Sorry, I am pretty new to access and these macros, so I am still having problems. Can you give me the exact Condition I would need to enter if I give you more info?

For example.

The form I am using is called "WorkOrder". There is a button on this page that I want, when clicked on, to check a row called "UP Billing Flag", which is a list from a table called "UP Billing Flag" that has for example, UP-1, UP-2, UP-3, etc. to chose from in the field. I then want it to open a form that corresponds with their selection, for example form "UP-2", if UP-2 was selected in that field.

Let me know if you need more info, and again thanks for your help.
 
Build the macro with a condition that states the criteria you need to check. example:

Code:
Condition                                       Action             Argument

forms!formname.UP Billing Flag="UP-1"       OpenForm            UP-1
forms!formname.UP Billing Flag="UP-2"       OpenForm            UP-2
etc.

Then set the OnClick event of the button to run this macro.

If you want, say, UP-1 and UP-3 to open the same form, UP-1/3; then your condition would be: forms![formname]![UP BIlling Flag]="UP-1" OR forms![formname]![UP Billing Flag]="UP-3"

Let me know if you need more info.
 
Well the macro is set, but it doesn't seem to know to check the field still.

The condition is:

forms![formname]![UP Billing Flag]="UP-02"

but even if I select UP-03, it is still opening up the UP-02 form.
 
[Forms]![formname]![UP Billing Flag]

replace formname with the name of the form where you select "UP-02" "UP-03"
This statement defines the combo box to look in for "UP-02" etc.

If you post your database I can look at it and see if you still need help
 

Users who are viewing this thread

Back
Top Bottom