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

Finding a record using a combo box not based on the record source

Status
Not open for further replies.
Jan 27, 2003
35
GB
I have 2 tables linked by a 1 to many relationship
via personID and PersonNo

PersonID 1-------M PersonNo

1 person may have many injuries.......

Form:
name=phys

Tables:
1st PeronInfo
2nd Injuries

Form record source:
Injuries

Combo Boxes:
no.1 Based on PersonInfo
using PersonID,FirstName,LastName
(personID is stored in a textbox (PersonNo) fromrecord source)

no.2 Based on Injuries and uses playerNO stored in the text box and the date of the injury. this locates a record and its values are located using this bit of SQL so the user can search injuries by date.

SELECT injury.InjNo, injury.PlayerNo, injury.Date
FROM injury
WHERE (((injury.PlayerNo)=[forms]![phys]![PlayerNo]));

how do i use the first combo box to select a record? it currently edits a record by changing the PersonNo the injury occured to.

any suggestions?
 
Use the ComboBox Wizard to create new lookup list that has no control source. Select the last option in the Wizard that says "Find a record on my form based on the value I selected in my combo box."

Then you will not have an issue with overwriting data in the current record.

Good luck! Anthony J. DeSalvo
President - ScottTech Software
"Integrating Technology with Business"
 
i cant select the fields i want because the wizard uses the record source of the form to select the fields used in the combo. The second combo was created in the way that u suggest. it is the first combo that i want to use that is the problem!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top