Dear All,
I am trying to update data in a table using a button on a form.
the following bit of code does what I want:
Dim rst As Recordset, db As Database
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT * FROM tablename _
WHERE [fieldname] = 'Smith123'")
etc.
What I really want to do is to replace the 'Smith123' with either a
variable or preferably the contents of a field on the form.
I have tried all permutations of brackets and punctuation but can't get
it to work.
Any ideas please.
Thanks in advance
John Fox
--
Dr John E. Fox
Director
All prices quoted are in UK pounds and do not include any taxes.
************************************************** ****************
Alta Bioscience Email:
al******@bham.ac.uk
The University of Birmingham Phone: +44 (0) 121 414 5450
Edgbaston, Birmingham Fax: +44 (0) 121 414 3376
B15 2TT, UK URL:
www.altabioscience.bham.ac.uk