MS Access-Macroc-Conditions

G

Guest

pulling my hair out. experienced access user with old 'tricks' not working.
just want to update one field in one table.
tried. condition:[table1]![field1]![value]="abc" and
[table1]![field2]![value]="xyz" action:setvalue
Item:[table1]![field3]![value] Expression:9
Then I plan to change the condition and the value to set line after line.

It keeps saying it can't find table1 or 'tables' if i put that in front.
This used to work like a charm in 97. Is something different, am i missing
something?
Thank you, thank you, thank you.

PS: I broke down and went the 'form' way since all the help keeps saying
'forms and reports' and it still says it can't find my form!
 
S

Steve Schapel

AusTex,

Referencing table fields in this way is not valid, in any version of
Access actually, including Access 97. You could use references to
controls on a form, as you suggested. In this case, of course, the form
would need to be open at the time that the macro is run. Otherwise, you
must be using incorrect syntax, but I can't comment on this as I haven't
seen the syntax you tried. However, this seems like an unnecessarily
difficult way of doing things. On the face of what you have told us so
far, this seems like a job for an Update Query, not for a whole set of
SetValue macros.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top