Results 1 to 2 of 2
2011-04-05, 15:38 #1
- Join Date
- Sep 2010
- Cheltenham, Gloucestershire, UK
- Thanked 0 Times in 0 Posts
run update only on current record in continuous form
I have a field [hyperlink] which contains a hyperlink to a folder relevant to the unique id ref field [jobs_ID].
I have an update query which will populate the hyperlink field with the explorer path (which is the same for all) but picks up the folder numebr from the id ref field. The only trouble is when I run it it tries to update all 4000 records in the table - when I only need the current one. Please what can I do to make the query only run on the current row/record? Thanks Roberta
2011-04-05, 18:15 #2
- Join Date
- Jun 2002
- Mt Macedon, Victoria, Australia
- Thanked 45 Times in 44 Posts
To restrict it to a single record, the query needs a Where clause (what you see as the Criteria in Design View)
This would update all records
"Update tblsomething set tblsomething.fieldname ='new value' "
"Update tblsomething set tblsomething.fieldname ="new value" Where tblsomething.[jobs_D]=12"
"Update tblsomething set tblsomething.fieldname ="new value" Where tblsomething.[jobs_D]=" & forms("formname").[jobs_ID]Regards
The Following User Says Thank You to johnhutchison For This Useful Post: