command button with drop down box

go2review.com

Registered User.
Local time
Today, 11:30
Joined
Mar 31, 2009
Messages
13
good afternoon

i have a front page and this there is a command button, what i would like is a command button the once clicked you a re able to choose from a drop down box and then once you pick it takes you to that record

is this possible

kr

a beginner
 
You can use;

Code:
    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "FRM_YourFormName" [COLOR="Green"]'This will be the name of the form to be opened.[/COLOR]
    
    stLinkCriteria = "[LinkID]=" & Me![Combo0] [COLOR="Green"]'LinkID will be the item you wish to link on in the form that is to be opened, whilst Combo0 is the name of the combo on your original form[/COLOR]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

In the on Click event of your button. See the attached to see it in operation.
 

Attachments

Last edited:
thanks for the formula, as i said im a little thick on access i have attached the data base and i would like it to pick a client name for the contract procedual table, using query pick a contract,and opening up form pcik a contract i do hope this makes sense

and again thank you
 

Users who are viewing this thread

Back
Top Bottom