Some Requerys work, some don't

  • Thread starter Thread starter freedomverse
  • Start date Start date
F

freedomverse

Some of my combo box requerys work and some don't. I have a form
"PeopleDetails" that contains all the people. In this form there are check
boxes that link with queries that include these people in differant lists.
For instance, if you check the box that they are a singer than that person
will be included in singer's list and won't show up in the other lists.

Within my main form there is multiple combo boxes on differant subforms that
allow you to pick the appropriate person from the list.

I can edit or add new people to the list by pressing a button on my main
form and opening the "PeopleDetails" form as a dialog box. In my code on the
next line I just put a requery command to refresh all the lists that can be
effected. The problem is that most of them work perfectly and a couple don't
-- and I don't understand why.

The following is the code attached to the "Add Person" button on my Main form:

DoCmd.OpenForm "PeopleDetails", , , , , acDialog
Me.Call.Form.GivenBy.Requery
Me.Teaching_Detail.Form.Teacher.Requery
Me.Pro_Detail.Form.GivenBy.Requery
Me.Pro_Detail.Form.GivenTo.Requery
Me.Other_Sharing_Detail.Form.PersonWhoShared.Requery
Me.Audio_Recording1.Form.AudioTransferTechnician.Requery
Me.SongsDetail.Form.LeadSinger.Requery

All of these work. Whan I try to add another they won't work. One combobox
is on a subform in datasheet view. one is a subform on a subform. One is
just a subform. I have checked names and spellings and they seem correct.
Any suggestions?

Jared.
 
Forget that question. I just found a space between the words in the name of
the form control name.

If only I could answer my own question before I spend a day troubleshooting...

sigh,
Jared.
 
Hi Jared,

when you say they don't work, what exactly do you mean? All of them?
some of them? do you get any error message?

before you open another form, it is a good idea to test the current
record to see if it needs to be saved and, if so save it

if me.dirty then me.dirty = false

Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.accessmvp.com/Strive4Peace/Index.htm

*
(: have an awesome day :)
*
 
Back
Top