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!

a form to look up records

Status
Not open for further replies.

lewie

Technical User
Jan 17, 2003
94
0
0
US
I want to make a main form with buttons on it and each button brings up a record. I want the caption on the button to be the name field in the record it brings up. So i essentially need to alter the caption property of a button based on a field in a table.
Please Help...
Thanks Lewie
 
Lewie

main form with buttons on it and each button brings up a record

Are you sure about this? Having one command or toggle button bring up one record is do-able, but...
- How many records are you going to have. This approach will work for a smal amount of records, say 25, but what will you do if you get 1000 records?
- To have a command or toggle button retrieve a specific record requires "hard coding". Does this mean when the data gets changed or deleted, you want to go in and edit the code for the record?

May I suggest using an unbound combo box or list box. The user selects the record they want to view from the combo or list box, and the the full record is displayed. This approach is dynamic, not heavily impacted by the number of records (unless you have 1000's of records), and can be done by using the combo or list box wizard.

Richard
 
I have a form i want to use to look up records. I need the form to contain info on 20 records that can change. Each record could be a state with info about the state. This info needs to be represented in some nature such as a button with a name on it. ie Alabama. I need the name to be editable and correspond to a record it will bring up. I was thinking of a button to a record with the button.caption = table.name or something like that. there will be a consistent table with 50 records of data i can draw from like 50 states with info about the states. That way when a button needs to change I can just change the record number and it will have the new info. so if someone clicked on alabama it would show statistics about alabama. If i needed that button for alaska I could have a change form and button 3 could be changed to alaska and wallah the name would change to alaska and the info would be for alaska. that way if we add a state i could just add it to the table.
I hope i was clearer this time.
Thanks Lewie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top