make one form open another form

danthegolfer

New member
Local time
Today, 14:04
Joined
Jan 4, 2010
Messages
2
hey all, im relatively novice with access but i am pretty good in Excel and decent with VBA. i have just never used VBA with access and not sure how to, or if i even need to.

i am making a simple system to store quality control information , a simple map of it would be:

User Enters data in the form "QCForm1", and submits the data to be stored in "QCSheet"

Once this data has been submitted, form "QCForm2" opens automatically:
In "QCForm2":
If user enters "Pass" for the "QC Result" field, data gets stored in "QCResultSheet"

If user enters "Fail" for "QC Result" field, data gets stored in "QCResultSheet" and form "QCForm3" opens for more data to be submitted.


I know how to link the data with primary keys and etc, my problem is how to bring up QCForm2 automatically, and how to bring up QCForm3 automatically (depending on user input). I think I explained it well enough, but if you would like me to explain or clarify anything please just let me know. Thanks for your help.
 
hi,
i'm not to clear on exactly what u need to do but from what i could make out u need to open a form after input of a certain field.

maybe this code could help get a little further.. i would use it under the AfterUpdate Event

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "YourFormName"
stLinkCriteria = "[FieldName]=" & "'" & Me![FieldName] & "'"

DoCmd.OpenForm stDocName, , , stLinkCriteria
Regards
abhi
 

Users who are viewing this thread

Back
Top Bottom