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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening form

Status
Not open for further replies.
Feb 25, 2008
46
0
0
US

I have a form in which the user enters his or her employee number and clicks on a command button to open another form (a form containing menu of other command buttons) which is specific to their employee number.

I need the following to code to be modified so that it opens their respective form

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Menu-(employee number)"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Please help me by suggesting how I can modify the above code to perform the required action.

Thanks,
Mark.
 
Something like this ?
stDocName = "Menu-" & Me![employee number control]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are ya markedback . . .

Are you saying: you have ranges of employee numbers that are prescribed by specific forms?

If the above is true you need to provide the ranges and their associated form names!

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top