Write To Field In Database With Macro

fubarbundy

New member
Local time
Yesterday, 20:58
Joined
May 2, 2013
Messages
2
Hi
I'm attempting to write to a database field with a macro. The macro can open the table, find the correct record and set focus on the right field but when I attempt to use the 'SetValue' Action I get the error message: "Microsoft Office Access can't find the name 'myfieldname' you entered in the expression. I've tried the field name with brackets, without brackets and with the table name but always gives an error.
The database is in a trusted folder.
Any one got any ideas?
 
What version of Access?

If A2010 or later is this a Data Macro? Embedded Macro?

What's the context? (i.e. you're running this in the After Update event of some Control on a form, etc.)

Can you post a screenshot of your macro here?
 
Hi Beetle
I'm running access 2007. The Macro just runs from the navigation pane. The Action commands i have so far are SelectObject, OpenTable, GoToRecord, GoToControl and then SetValue. Everything works ( the table opens in datasheet view, the correct record is selected, and focus is set on the correct field ) but I cannot get SetValue to enter a value in the field.
Thanks for any ideas.
 

Users who are viewing this thread

Back
Top Bottom