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

Form Data Not Updating

Status
Not open for further replies.

TrekBiker

Technical User
Nov 26, 2010
330
0
16
GB
This form has details of beer orders, in this example Order ID 1725127, which has separate record pages for the three beers in the order. The one shown is for Aspall Cyder, for which 3 were required, each needing to be assigned to a separate cask.

Book_Out_av65i0.jpg


The Book Out button for this 'Foreign' product on Page 2 of 3
- asks for the first Cask ID
- does several integrity checks
- updates the tables containing the product and order details
- opens a new form to show the changed data
- on closing this form, updates what's displayed on the Booking Out form

The first obstacle was that doing this caused the focus to jump to Page 1 on returning to the Booking Out form, same when repeating the process on Page 3. This was cured by changing Me.Requery to Me.Recordset.Requery at the end of the booking out code.

Now the list box AssignedForeign doesn't update (this shows all CaskIDs already assigned).

As above,
- CaskID 46673 is shown but needed change page or close/reopen form to make it appear
- CaskID 46906 has since been booked out but the list box still shows just 46673
- Casks Assigned correctly shows 2

I've tried adding Me.AssignedForeign.Recordset.Requery in different places but without effect. Suggestions please?!

Can provide the booking out code if it helps.
 

No takers on this one but found a work around for the List Boxes not updating.
Instead of Me.AssignedForeign.Recordset.Requery I used Me.AssignedOwn.RowSource = "qryListBoxOwn".

Left wondering why this worked when others didn't.

 
You mention “pages” but I think you mean records. We have no idea about table structures, relationships, and the row source of the list box. I would have tried:

Code:
Me.AssignedForeign.Requery

But I have had similar fails where reassigning the row source always works.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Thanks Duane. I didn't have success using Me.Assigned.Requery but as you say, reassigning the row source appears to be very reliable.

The whole area of Requery, Refresh, Recordset.Requery etc is a bit of a mystery to me.
 
Requery seems to have failed me in the past when using with either record or row sources.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Glad it's not just me! Hope you're recovery is proceeding well.
 
Recovering well. Getting some hours on stationary 🚲. Always watching HR.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top