update

awake2424

Registered User.
Local time
Today, 09:16
Joined
Oct 31, 2007
Messages
479
Hello,

I have a Access 2003 form that is exported to an excel 2003 worksheet. Some of the fields do not update in the worksheet though they are entered in the form. Other enteries are fine. Any help would be appreciated. Thanks in advance.
 
What is likely happening is you need to issue a save before doing the export.

Add this code to the button that does the export (at the very beginning of the code):

If Me.Dirty Then Me.Dirty = False

that should do it.
 
The data is updated via a Query Refresh, so I am not sure where to add the command. Thanks.
 
I am doing the update via a database query then the excel worksheet is updated by a refresh prompt.
 
That actually makes no sense, given your initial post:
have a Access 2003 form that is exported to an excel 2003 worksheet.

So, how are you entering the data in Access? You AREN'T using a form? Or are you? If you are using a form, then can you give a step by step of what process you are going through? It sounds like you are not exporting to Excel but instead are linked into Access from Excel and are just refreshing the data. The key would then be how are you updating the data in Access and are you using a form? If you are using a form then you need to either move to another record, close the form, or use code to save the record before the data would be available in your Excel file when you do the refresh.
 
I apologize, there is a link from access to excel. I have tried moving to a different record, closing the form and that seems to work for most but not all. Some fields on the excel list are not updated while other are. I can try a code but am not sure how. Thanks.
 
Some fields on the excel list are not updated while other are.
And that could be due to whatever the query is between Excel and Access. It could be limiting records to some criteria and therefore not letting it all through. Can you go check to see what the SQL of that query is? If you have Excel 2003 (that's what I have at work so that's all I can give guidance on at the moment), you can first open the spreadsheet where your data is on and go to the menu and select

DATA > IMPORT EXTERNAL DATA > EDIT QUERY

Click NEXT until you get to see a button that says SAVE QUERY and then save the query somewhere where you can find it. Then just hit Cancel. Go to that query and then right-click on it and select EDIT IN NOTEPAD and then copy the contents here so we can see if anything looks like it could be causing the problem.
 

Users who are viewing this thread

Back
Top Bottom