By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,701 Members | 1,711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,701 IT Pros & Developers. It's quick & easy.

Refreshing form data when table contents change in access 2010

P: 50
Hello,

I have a comboBox field named "FullName" that pulls data from a table then populates other fields. When I edit the records on that table, the changes are not reflected on the form.

I have tried the me.Refresh and the me.Requery approach and it does nothing.

What would be the best way to handle this so that changes made are reflected on the form without having to re-select data from the comboBox?

I have several fields in the same situation.

Greatly appreciate it,

Alex
Mar 19 '15 #1
Share this Question
Share on Google+
5 Replies


Seth Schrock
Expert 2.5K+
P: 2,951
Is the information that is changing on the form or in the combo box? Something else to look at is to make sure that the changes have been saved when you perform the requery.
Mar 19 '15 #2

P: 50
@Seth Schrock
The information that is changing is on another table that the combobox looks up. For example, I enter info on the form, data on the FullName field looks up data on a table and populates other fields based on the choice made on the combobox. Data is saved on the form. Then at some point the table that the combobox got its info from, is updated. When you load the form again, naturally, the items that were changed on the other table are not reflected on the form, thus you have to click the combobox and re-choose from the list so that the changes are populated on the respective fields...
Mar 19 '15 #3

Seth Schrock
Expert 2.5K+
P: 2,951
This sounds like you are copying the data from the one table to the other when you make your selection in the combo box. Is this correct?
Mar 19 '15 #4

P: 50
Maybe..., this is the way I'm doing it. The table, actually using a query, "qryEmployees" (linked to "tblEmployees"), is the rowsource used by the "FullName" combo to populate the list. The query contains about 30 columns, I use the Column Widths property to just display the employee full name. The, on the On Change event of the combo I have something like this:

Expand|Select|Wrap|Line Numbers
  1. Me.PositionTitle = Me.FullName.Column(1)
  2. Me.PositionType = Me.FullName.Column(2)
  3. Me.Grade = Me.FullName.Column(3)
Etc... When you choose a name, it populates the respective fields. On the form say the title is Manager, I save record, close form, edit the "tblEmployees" and change the title of that person to Supervisor. When I re-open the form, the title still says Manager, in order to change it, I have to go to the combo and re-select that employee from the list, then the record gets the new info...

Thanks...
Mar 19 '15 #5

Seth Schrock
Expert 2.5K+
P: 2,951
So yes, you are copying the information from tblEmployees (via qryEmployees) to the table that your form is bound to. This problem that you are having is the reason that you don't copy the data over. Instead, if you just use the combo box to create the tie between the two tables, you can use a query to get the data across. You should look at Database Normalization and Table Structures.
Mar 19 '15 #6

Post your reply

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