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

form link question

Status
Not open for further replies.

tomvdduin

Programmer
Sep 29, 2002
155
NL
Hi,

How can I, when I push a button, check if a value exists in a table and then depending on that, open a new form with the values in that form filled in or open a new form in add mode?

Let met explain: I have a form, where I can enter basic information of a family (last name, address etc). On the bottom of that form I have two subforms, that shows the head of the family (mostly a male person) and it's partner. When I enter the family form, it's empty. So then I fill in the textboxes with the name and address. Then I want to add a head person, so I click a button. Then Access must check if that family has already have a head person, if not, show an empty form, else give the details of that person. The first time, there's no details of a head person because it's a new family. But when I have already entered the head person and I click the button, it must show the details of that person.

How can I do that?

tnx in advance 4 your answer!
 
Hi

I assume from your description that the head of family data is in a seperate table to the family data?

In your head of familiy subform control, if you set the linkmaster/child fields correctly, the head of family data will be displayed automatically (if present)

Hope this helps Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
 
Tnx 4 your answer, but it isn't complete for me.

I do have two separate tables, one for the family with surname, address etc, and one table for information about persons. With a family, you can have a head person, it's partner and children. The form where you enter the attributes of a family, shows at the bottom information about the head person, it's partner and the children. But it only shows that information if it is already filled in. If you add a 'new' head person or partner or child, access gives an error: link error, because the new person doesn't already exist.

I hope you can help me with this!

greetz

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top