473,395 Members | 1,418 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,395 software developers and data experts.

Requery a List Box in a Subform "On Record Navigation"

Hi everyone,

First a brief description of my form: I have a subform within a main form. In my subform, I have a listbox displaying address information by firm name. A user first has to select a firm name in a combo box above the list box. The listbox and the combo box join on firm name. The listbox records what address was selected in the address table by the way of an address id number. I set up a macro to requery the listbox when you select a new firm name in the combo box. The code for the requery is as follows:

Private Sub firm_name_AfterUpdate()
Forms!Contract!Contract_Subs.Form!List25.Requery


End Sub

My problem is that when the user moves to a new record in the subform, the address information does not refresh; you have to click on the new firm name before the address information will update itself. I am worried that this in one more thing a data entry person will have to worry about.

I am wondering if there is a code that would requery my listbox whenever you move to a new record in my subform, essentially an "On Record Navigation" requery option. I have tried nearly all the macro requery possibilities with no luck. Ideally, a user would be able to go back to previous records and see what address he or she had selected, however I would be happy even if it just requeried to blank.

Any suggestions? Thank you for your help,

Marko
Dec 7 '06 #1
6 7962
Hey again,

I think I figured it out, but if anyone has any new ideas, let me know. Hope to contribute in the future, thank you,

Marko
Dec 7 '06 #2
I suspect that if you put code into the "On Current" field of your subform, it will have the desired effect.
Dec 7 '06 #3
Yeah, that was it. Thanks for your reply.
Dec 7 '06 #4
Happy to help
Dec 7 '06 #5
Widge
56
Hi there!

I've got a similar piece of coding going on but having the same problem.

I have 3 tables and at the moment I'm focussing on two of them. One full of Suppliers, another with their Product Codes and Descriptions. These are joined by Supplier name.

My form has a combo box which lets you select your desired supplier. This then enables a list box once selected which shows you all their Product Codes and Descriptions. Above these I have two text boxes. I would like it that once a line in the list box is selected, the relevant Code and Description for that record is displayed in the text boxes for editing purposes.

How can I achieve this?

Thanks for any help!

Si
Apr 13 '07 #6
Widge
56
Also, another thing I would like to know is how I could directly edit the record by typing into the listbox itself.

My initial idea was to just have a listbox which you could directly edit and add lines to for new records.

I couldn't figure it out, hence having to add in text boxes for adding/editing records.
Apr 13 '07 #7

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

Similar topics

4
by: Jim | last post by:
Hey guys I have this page that uses a small script that changes the button image when the button is clicked. The problem is that when clicked, the page suddenly "jumps" to the top. I have purposly...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
3
by: Lee-Anne Waters via AccessMonster.com | last post by:
Hello, i have just upgraded my database from access 97 to access 2000 and updated all the jet paks. however when i use my import functions to import orders (.csv) one order will appear as a group...
4
by: Timo | last post by:
We have a long page of links (LinkButtons). Is it possible to save the scroll position so that when a postback occurs after a link has been clicked, we can return the page to its scroll state? Our...
8
by: Nick | last post by:
I have a table with columns (product_id,related_product_id,related_counter) If product A is related to product B then a record should be created, if the record already exists then the...
1
by: AA Arens | last post by:
I my form I have put record navigation buttons. When I choose just before the last record, the "Go to next record" button, access automatically start with a new record instead of a message that...
3
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, Below is sample output in x12 EDI format. I'm using vb.net to create this output file but i'm not sure if .NET has any tools to make the coding more organized and/or efficient. Right now the...
0
by: tgkprog | last post by:
hi i'm trying to use Win32::IEAutomation to automate clickbank.com navigation and page saving i can login and go to the https://www.clickbank.com/account/showTransactions.htm page but cannot...
25
by: tekctrl | last post by:
Anyone: I have a simple MSAccess DB which was created from an old ASCII flatfile. It works fine except for something that just started happening. I'll enter info in a record, save the record,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.