using subforms

CFP - Jason

Registered User.
Local time
Today, 10:28
Joined
Jun 9, 2003
Messages
54
in my report i wanna prompt to choose a contact, based on the company chosen. it is viewed in a subform right now. how do i go about making that work?
Jason
 
Do you mean you want to choose a company from a combo box and have it populate a subform with the contact info?
 
im sorry i was very vague. i find a company thru a search etc and i am in the record for that company, and i want to print the info of the company i am on. right now i have a button that does this but i cant figure out how to include a specific contact which is a subform in the customer record. i want to prompt to pick the one they want.
jason
 
CFP - Jason said:
im sorry i was very vague. i find a company thru a search etc and i am in the record for that company, and i want to print the info of the company i am on. right now i have a button that does this but i cant figure out how to include a specific contact which is a subform in the customer record. i want to prompt to pick the one they want.
jason

OK, so you search for a company, (this updates your form with a company record) and you then want to select a contact's details?

If you want to populate a combo with all of the contacts for a company when your form updates, you just need to change the combo's Row Source property. You can do this by just adding the following to the After Update event of the combo you use to select the company:

Me!cmbContact.Rowsource= "[YOUR SQL STRING SUMMARISING THE CONTACT NAMES]"

Is this what you mean?
 
no i mean that i have all the info, i want to print a summary report of this company to take on the site with me. but i dont need all the contacts for that company just one that i pick. i am trying to find out how to pick the contact. its setup so that there are infinate names with infinate numbers for each but per company. and i dont know how to select one in a report.
Jason
 
In the SQL that drives your report you just need to reference the combo (or whatever other control) that you used to select the contact. Place this reference under in the criteria section of the contact field.
 

Users who are viewing this thread

Back
Top Bottom