How do I get the first value returned from a table into a variable#

homer2002

Registered User.
Local time
Today, 03:42
Joined
Aug 27, 2002
Messages
152
Hi i'm creating a split database. I update the front end which needs to be sent out to users. In order to keep people using the latest version, I have created a table to hold one record (A Version number). When the front end opens up it's supposed to check that it is the current version (i.e. FrontEnd Version = BackEnd Table Value.

Unfortuantly I'm missing the key aspect of this.

I don't know how to return the value of the record into a variable to perform the check.


i need somthing like

Dim AVariable as Integer
AVariable = tables!VersionTable!FirstRecord.
This is obviously wrong, but can someone provide the syntax for me.

Thanks Homer.
 
I´m a bit uncertain about the dbs reference, I usually refer to the current db. Anyway I think this will do it, hopefully someone will put it straight if I´m wrong.

dim dbs as database
dim rs as recordset
dim aVarible as integer

set dbs = ("pathtothebackend")
set rs = dbs.openrecordset("yourtable")
aVarible = rs.fields("yourfield")'since you only have one record in it
 
Have you tried -

Dim MyField As String

MyString=DLookUp("[Version]","[VersionTable]")

Since there is only one record in the table, it has to find it.

(Haven't we done this one before?)

Dave E
 

Users who are viewing this thread

Back
Top Bottom