Me?

lead 27

Registered User.
Local time
Yesterday, 21:44
Joined
Mar 24, 2007
Messages
147
Hi

I am just wondering if anyone knows:

If I want to change a field on the current form I start the code with Me. However is it possible to change every record for that field in the table so I assume it might be instead of

me.[fieldname] = ??? it would be

[tablecode].[tablename].fieldname]= ???

Thanks
 
Last edited:
If the field on the form is bound to the table then the table will be updated automatically. otherwise you probably need to use VBA to update the record.
 
Thanks for your quick response. The field is updated in the table for the current form that I am on however this will only update one record in the table and I need it to update every record in the table.

Thats why I was thinking that me. means current form so is there a way to say this field on every form in the table?
 
If you want to update every record in a table then an Update Query is the best way to do this.
 
yeah I have looked into this but I will need it to update every time the information is changed which will be quite oftern.
 
If you build the SQL string in your code then you can fire it off with a Docmd.RunSQL.
This should mean you can make it reasonably automatic if its always the same field in the same table. Then I would guess you only need to insert the new value for the field and possibly you will need to alter the Where clause to select the right records.
 
What do you mean by build the SQL string into your code?
 
I think that I have it sorted now but do you know how I can stop the warning boxes coming up asking if im sure etc?
 
Go to Tools --> Options --> and then in the Edit/Find tab uncheck Action Queries in the Confirm area.
 

Users who are viewing this thread

Back
Top Bottom