A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Some Requerys work, some don't



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2008, 06:06 PM posted to microsoft.public.access.forms
freedomverse
external usenet poster
 
Posts: 4
Default Some Requerys work, some don't

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.Reque ry
Me.Audio_Recording1.Form.AudioTransferTechnician.R equery
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.
  #2  
Old April 30th, 2008, 06:42 PM posted to microsoft.public.access.forms
freedomverse
external usenet poster
 
Posts: 4
Default Some Requerys work, some don't

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.
  #3  
Old April 30th, 2008, 09:05 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default Some Requerys work, some don't

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
*



freedomverse wrote:
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.Reque ry
Me.Audio_Recording1.Form.AudioTransferTechnician.R equery
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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.