Does anyone know how to select a record in a form by using an integar.
I can change a textbox to contain the record number by using the below code
But I can't change the record in the form by using a record number.me.text1 = me.form.CurrentRecord
I would have thought that it would go something like the below but it looks like a 'Record' property doesn't exist. Anyone know if there is a way of doing this? I'm using Access 2002.
Thanks.Me.form.record = text1.value
Last edited by danny2000; 07-21-2011 at 04:38 AM.
You need to use SQL or VBA with recordsets to update the underlying value. In general, a SQL statement will be easiest, something like this:
You can execute this in VBA by using the DoCmd.RunSQL method.UPDATE your_table SET yourfield=text1.value WHERE table_id_field=record_id
Is your code running too slowly?
Does your workbook or database have a bunch of duplicate pieces of data?
Have a look at this article to learn the best ways to set up your projects.
It will save both time and effort in the long run!
Dave
Dave, thanks very much. Good solution too.
I'll definitely use that. Thanks again.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks