opening form

G

Guest

I have a People form that allows editting of a specific record in the People
table. I would like to add a control button that opens up the matching
Volunteer Form (based on the Volunteer table). If there is no volunteer
record for this individual, I'd like the control button to open a new record
and set the value of the related field (People ID).

Ideally, from the People form, if a volunteer record exists for this person,
I'd like the command button to read "Volunteer Record" and if not, "Add as
Volunteer". But since the People form data source is the People table, I
don't know how I could check the Volunteer table for this information. I
tried changing the data source for the People form to a query that includes
both the fields from the People table and Volunteer.[People ID] and
Volunteer[Volunteer ID]; however this messes up my button on my Household
form that initally opens the People Form.

How can I set up this command button?

thanks, Amanda
 
U

UpRider

Amanda, your command button could do a dlookup in the volunteer table for
the PeopleID. If not found, then open the volunteer form for data entry. If
found, open the volunteer form with the person's volunteer data showing.
This might be a good example for a subform on the People form showing the
volunteer data. No lookups required - the volunteer data will always show
volunteer data or blank, whichever applies.

HTH, UpRider
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top