Requery Problems (1 Viewer)

Hayley Baxter

Registered User.
Local time
Today, 16:30
Joined
Dec 11, 2001
Messages
1,607
I deleted my previous posting today seeing as there were no replies and I thought I had resolved the issue, now it's even more frustrating.

The requery finally decided to work with the same syntax I had previously - only thing is it works on the first occasion and then stops which is pretty pointless.

This is what I have

Forms![Frm Suppliers]![Sub Agreements].Form![cboSupplierID].Requery

Sub Agreements is the name of the Subfrm control and not the subform. I have checked on MS Knowledge base also and the syntax should be correct based on what I have.

Does anyone have an explanation why it works first time then stops?

Thanks
Hay
 
Last edited:

KenHigg

Registered User
Local time
Today, 11:30
Joined
Jun 9, 2004
Messages
13,327
Can you put enough in a .mdb to post?

kh
 
R

Rich

Guest
Are you running the code on the subForm, if so the Main form references etc. aren't required?
 

Hayley Baxter

Registered User.
Local time
Today, 16:30
Joined
Dec 11, 2001
Messages
1,607
No I'm running the code from the main form. The idea is that when users add a new supplier record, the entry will then immediately update therefore the combo box on the subform will list the newly entered supplier record so that contracts can be added for the new supplier there and then instead of having to close the form and go back in.

As I said previously it works the first time that a supplier is entered but when I try to add a second without closing the form it doesn't want to know. Perhaps it may be do to with where I am puting the code? I currently have it after update of the supplier ID field. I have also tried saving the record on the main form firstly to no avail.

Any suggestions greatly appreciated.
Hay
 

KenHigg

Registered User
Local time
Today, 11:30
Joined
Jun 9, 2004
Messages
13,327
Is the main form getting to write the record to the table before you requery?

kh
 

Hayley Baxter

Registered User.
Local time
Today, 16:30
Joined
Dec 11, 2001
Messages
1,607
Rich said:
it's just [subControlName].Form![YourCombo].Requery

That didin't work I'm afraid Rich. I exported everything to a blank db and kept only a few tables forms fields etc to test with and It worked using the syntax in my first post. I copied the exact syntax over to the proper db and it all turned pear shaped again so something else on the form must be causing the problem :confused:
 

Hayley Baxter

Registered User.
Local time
Today, 16:30
Joined
Dec 11, 2001
Messages
1,607
I've got it working now - no change really. A case of Access working when it feels like it perhaps - o the joys :rolleyes:

Thank for taking the time to help Rich & Ken :)
 

EdV

New member
Local time
Today, 11:30
Joined
Sep 16, 2004
Messages
8
funny thing happened when re-accessing the newly created record from the main form using a autonumber. I see the new record number in the main form, granted - record was created, but cannot get to it on the subforms even with "cycle all records" on, it stays on "autonumber"

seems to be a issue with creating new and re-accessing records in one form session 1 to many updates. Yes or No? does the newer access 2003 behave like this too?

I'm using access 2000 in winxp. is this the prob?

still waiting
Ed
 
Last edited:

Users who are viewing this thread

Top Bottom