If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Searching on Primary Key

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-30-10, 19:04
Delore Delore is offline
Registered User
 
Join Date: Aug 2010
Location: California
Posts: 8
Exclamation Searching on Primary Key

MS Access database. My primary key is an automatic number. I would like to search on this field but cannot find an easy way. Any help appreciated.
Delore
Reply With Quote
  #2 (permalink)  
Old 08-30-10, 21:58
Poppa Smurf Poppa Smurf is offline
Registered User
 
Join Date: Jun 2007
Location: Sydney,Australia
Posts: 346
What do you mean by search? You could create a Select query with table as the source then in the criteria of your primary key field enter {Enter Search number]. This will display the record based on the number entered.
__________________
Poppa Smurf
allanmurphy47@gmail.com
Reply With Quote
  #3 (permalink)  
Old 09-01-10, 14:18
Delore Delore is offline
Registered User
 
Join Date: Aug 2010
Location: California
Posts: 8
Smile

Thanks,

I know I can search for a specific record by selecting any of the data fields and then using the Access 'Find' button to go to the record but as the primary key auto number cannot be selected I was stumped as to how to select a specific record (Record 998 for instance) and go to it. I will try your suggestion.
Reply With Quote
  #4 (permalink)  
Old 09-01-10, 16:47
Sam Landy Sam Landy is offline
Registered User
 
Join Date: May 2004
Location: New York State
Posts: 931
I think that what you want to do is to create a form with a combo box, along with all the other text boxes for the fields. You want to use the wizard to create the combo box. When it asks whether you want to use the combo box to find a record and make it current, answer yes. The wizard will do the rest.

SL
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On