Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help beginner with expression

Status
Not open for further replies.

wblue

Technical User
May 25, 2001
131
0
0
US
This used to be simple in Approach, but I do not know how to begin here in Access.
I am entering a new record in a form. One field (A) has three possible values. When closing this form, I want one of three possible forms to open automatically depending on the value entered in A. If A = X, open form 1; if A = Y, open form 2.....and so on.
 
In the form close event, try this:

If A = X then
DoCmd.OpenForm "form1"
elseif A = Y then
DoCmd.OpenForm "form2"
elseif A = Z then
DoCmd.OpenForm "form3"
end if

Hope this helps. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top