driving me insane. how to update current record on a button push

webcat

Registered User.
Local time
Today, 13:20
Joined
Jun 7, 2007
Messages
11
Hi

this is mad, for three days i've been scouring the web and my books on VBA, Access etc...

I have a linked table from a MS SQL server
for some reason I can't edit any data in it directly - ie, when typing into a form, i just get a locked message.
however, when i run SQL queries on it, it works fine.???!

i guess this must be some crazy SQL permissions issue?

anyway. i need to UPDATE a field called archiveFlag - this is to tell the following query which records to move to an archive table, out of the main table.

and i want to do this by having a button on each line of a Continuous Form

I'm completely stuck here - how do i write a SQL or DAO or ADO script to simply update one field on the CURRENT record - current being the one on which the button is pressed.

i'm going nuts here. my chair is uncomfortable and the radio is too loud and I can't get my DB to work!!! please help!

thanks!
 
Without knowing your connection type etc, would something like the following work

ado.field("fieldname") = value
update filename

Top of the head stuff hope it helps. ADO if positioned to the record you want to update doesn't require the rest of the fields to be acknowledged in anyway. Yes I know the fields will feel lonely but that's life in the big bad digital age.
 

Users who are viewing this thread

Back
Top Bottom