473,416 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

How to use refresh/requery and move to next record after update

I've been struggling with a form. On the left side of the form I've got data from a table of invoices, and on the right side I've got a combo box with data from a table of payments. The user scrolls through the invoices on the left and matches each one up with a payment from the combo box on the right. The common field is an order number, but the relationship between invoices and payments must be created manually by the user matching up the records.

I have two problems:I can't seem to get the requery or refresh working properly - each time the user scrolls to a different invoice on the right, I need the combo box on the left to refresh so that it will only return the payments that correspond to that order number.

My second problem is that whenever the invoice and payment are matched up and the record is saved, the form jumps back to the very first record. I need it to move forward to the NEXT record so that the user doesn't have to keep going back through previously viewed invoices.

I'd really appreciate any help.
Thank you!
Aug 23 '07 #1
6 5312
Jim Doherty
897 Expert 512MB
I've been struggling with a form. On the left side of the form I've got data from a table of invoices, and on the right side I've got a combo box with data from a table of payments. The user scrolls through the invoices on the left and matches each one up with a payment from the combo box on the right. The common field is an order number, but the relationship between invoices and payments must be created manually by the user matching up the records.

I have two problems:I can't seem to get the requery or refresh working properly - each time the user scrolls to a different invoice on the right, I need the combo box on the left to refresh so that it will only return the payments that correspond to that order number.

My second problem is that whenever the invoice and payment are matched up and the record is saved, the form jumps back to the very first record. I need it to move forward to the NEXT record so that the user doesn't have to keep going back through previously viewed invoices.

I'd really appreciate any help.
Thank you!
Look at the BOOKMARK property in Access, the general sequence being ....prior to 'saving' set a pointer to the bookmark...save and then return to current record to the bookmark .Plenty of references for this in help

Regards

Jim
Aug 23 '07 #2
I didn't know bookmark was the term - thank you. I'll research that in help.

Do you have any advice for my refresh/requery issue?
Aug 23 '07 #3
Jim Doherty
897 Expert 512MB
I didn't know bookmark was the term - thank you. I'll research that in help.

Do you have any advice for my refresh/requery issue?
Refreshing a combo box based on the value of another combo is very common Access stuff in the afterupdate property setting of the box on the right you should be setting the row source for the combo on the left to requery itself and return records that relate specifically to the bound value selected in the right box with something like Me!LeftComboName.requery.

The fact that your users have to manually insert the link key is somewhat perturbing because in the design process you ought to be keeping that mechanism out of reach of users and let access do it behind the scenes?

Invoices ,orders and payment systems are quite common Microsofts Northwind traders database example gives example of how link keys should behave ie no human interaction

Jim
Aug 23 '07 #4
The reason the user has to manually create the relationship between the order and the invoice is because the data is coming from two different systems and there isn't a reliable way to programmatically create the relationship. The invoice amounts are auto-billed to credit cards so an invoice is automatically created (by an outside vendor), and in our in-house system we determine whether the standard charge is the only one that will apply for that month, or whether we need to bill the client for an additional amount. Therefore we have multiple payments for each order.
Aug 24 '07 #5
Jim Doherty
897 Expert 512MB
The reason the user has to manually create the relationship between the order and the invoice is because the data is coming from two different systems and there isn't a reliable way to programmatically create the relationship. The invoice amounts are auto-billed to credit cards so an invoice is automatically created (by an outside vendor), and in our in-house system we determine whether the standard charge is the only one that will apply for that month, or whether we need to bill the client for an additional amount. Therefore we have multiple payments for each order.
okey cokey that explains it much better I mistakenly took it to be all done it Access I apologise unreservedly if I appeared to be overly critical

Jim
Aug 24 '07 #6
No need to apologize - I'm not that good at Access, but I'm not completely hopeless. :-) I really appreciate your help and advice - everything is working perfectly now.

Thanks very much!
Donna
Aug 24 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John Baker | last post by:
HI again: I have made 2 posts on this issue, and for some reason still haven't got the right result. I have a form which contains a number of totals. These totals use unbound control boxes and...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
5
by: Andrew Chanter | last post by:
I have a situation where I am using an unbound dialog form to update data in an Access 2002 split back end / front end scenario. The data update is done via an ADO call (direct to the back end...
6
by: Henry Stockbridge | last post by:
Hi, I have a popup that is used to update the records on an open form. I cannot get form to refresh with the new values. Any help you can lend would be appreciated. Here is the code for the...
6
by: scott | last post by:
I guess this is a simple one but I can't seem to get it to work. I want to refresh an open form "onClose" of another. I have a Close button on a form which has User Details on it. If I update...
1
by: Birderman | last post by:
HI, Any help would be appreciated. Using Access 2003 I Have a form with several buttons to drive different events that work. I want the buttons to be enabled or disabled dependent upon...
6
by: Chris Larmer | last post by:
I have two subforms in my main form. In the main form I want the user to select a customer, class, and date range. The 2 subforms are similar. One is the history records in the recent past and the...
5
by: mattcolenutt | last post by:
Scenario: Have a product form with an "image location" field. The image property uses this field to display the image. Problem: If an image location field has been changed, the image will not...
4
by: aaronyoung | last post by:
I have created custom navigation buttons and Record Number indicators on several forms that are used to review and update records based on a query. My On Current event to update the "Record X of...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.