Search buttons

  • Thread starter Thread starter allison
  • Start date Start date
A

allison

Hello. I have a database that I am creating. I have 3 sub switchboards
that I want to look up very specific information. If I type or select
the name of a company (from a dropdown box I have on the switchboard),
I want to hit a command button that brings up the contact form with
that company. I have tried many things and nothing seems to work. I am
very new at this and might just be overlooking the answer. If anyone
could help me, I would be grateful. I also want to do the same thing
on my other switchboards (Vendors and events). The events get tricky
because there are multiple events for any given contact. Maybe there
is an easier way to handle this.

Completely Lost,
Allison
 
Hello. I have a database that I am creating. I have 3 sub switchboards
that I want to look up very specific information. If I type or select
the name of a company (from a dropdown box I have on the switchboard),
I want to hit a command button that brings up the contact form with
that company. I have tried many things and nothing seems to work. I am
very new at this and might just be overlooking the answer. If anyone
could help me, I would be grateful. I also want to do the same thing
on my other switchboards (Vendors and events). The events get tricky
because there are multiple events for any given contact. Maybe there
is an easier way to handle this.

Completely Lost,
Allison

Allison,

To simply open a form to a certain record put this code behind your
button.

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Your Form Name"

stLinkCriteria = "[Your Matching field on form you are opening]="
& Me![The Matching field on Switchboard]

DoCmd.OpenForm stDocName, , , stLinkCriteria
 
Allison,

Just so your aware the the following should all be on one line.

stLinkCriteria = "[Your Matching field on form you are opening]="
& Me![The Matching field on Switchboard]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top