Darrell,
Just to clarify a few matters, side issues but relevant:
- databases don't have cells
- data in Access tables can not be a record number
- records in Access tables is unordered
.... and while I'm on a tangent...
- it is not a good idea to use characters liks # or / as part of the
name of a table or field or database object.
Ok, back to your question. Your macro will be running from an event on
the form, right? You can do it like this...
Action: GoToControl
Control Name: [TagID]
Action: FindRecord
Find What: =DLookUp("[Find Device]","FindDevice")
As I mentioned in my previous reply, this assumes there will only ever
be one record in the FindDevice table.
--
Steve Schapel, Microsoft Access MVP
Steve:
Again I appreciate your timely response.
My form is based on one table called LinkTrac I/O (actually there are more
tables that have relations to this table but we do not need to address these
at this time). The LinkTrac I/O table has all of the records in it that I am
interested in. This table has a Primary Key TagID AutoNumber in the first
field. I assume that this is the record number also because there can be no
duplicates and is indexed.
The second table is called FindDevice and that table only has a Primary Key
ID# field and a Find Device field. Obviously I can change the Data Type to
either Text or Number for the Find Device Field.
The other software I have is a graphics based control software that can
connect to my Access database and either download a value or a string by
using ODBC and data mining directly to a specific cell in my ccess database
(FindDevice table). I can actually pass information back and forth if I
wanted to.
I alread have a FindRecord Command Button on my form for finding specific
records but that uses a dialog box that someone has to input information in
to find. I want to automate a find by having the control software put a value
in the one field, Find Device, in my FindDevice table then I would like
something in Access to look at that Find Device field and go to that specific
record. I would prefer to use an integer (number) verses a text string in
that Find Device field because it would be easier in my graphical control
software to do it that way.
So, if the graphical control software writes a number to the Find Device
field then Access would automatically find and display the record in my form
using the number in the Find Device field matching it to the coresponding
number in the Primary Key TagID column in the LinkTrac I/O table to display
the record.
Is this clearer?
Thanks again.