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!

Only one check allowed??

Status
Not open for further replies.

TresVinos

Programmer
May 25, 2002
8
0
0
US
Hello everyone, I'm new to the list and have intermediate knowledge of Access. I use Access 97. I have searched the site but have not been able to find a solution for my problem:

I have a form with a subform. The form is for the Client and the subform (datasheet) is for the Contacts related to the client. In the Contacts subform I have a checkbox field called "Primary". Only one of contacts in the subform for the client should have the "Primary" field checked. The contact selected as primary will be the one to be printed on letters, reports, etc.

Help would really be appreciated on how to do this!! I have a few more questions that have boggled my mind that I'll probably be posting later on. This site is better than any book I've ever bought!!

Thanks again,

Rafael Treviño
 
I'm sort of winging this answer, but here is something you might try.

Change the subform to a continuous forms form that has a command button with code behind it to set that contact as the primary. The on click code should run an update query with sets all contacts related to that client to false, followed by another update query that sets the selected row Contact to true.

As to the printing with the proper contact, base the report on a query which only select the row on the many side where Contact is true. - - - -

Bry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top