Viewing single record.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I have a table just for Keys. It will be one record it reads only. How can
I get this record into my code? I could do a dLookup for each feild, but I
have more then I'm showing here.

Here's what I am trying but "LLenght, LHeight, LWidth" come up empty.

dim vLLen, vLHgt, vLWth

vKeys = "Select * from tbSettings Where recordid = 1"
Set db = CurrentDb()
Set rs = db.OpenRecordset(vKeys)

vLLen = LLength
vLHgt = LHeigth
VLWth = LWidth

rs.Close
db.Close
 
I just figured it out by using :

vLLen = rs![LLentgh]

Is there a better way to do this though?
 
Right, this is a correct way

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Mark said:
I just figured it out by using :

vLLen = rs![LLentgh]

Is there a better way to do this though?

Mark said:
Hello all,

I have a table just for Keys. It will be one record it reads only. How
can
I get this record into my code? I could do a dLookup for each feild, but
I
have more then I'm showing here.

Here's what I am trying but "LLenght, LHeight, LWidth" come up empty.

dim vLLen, vLHgt, vLWth

vKeys = "Select * from tbSettings Where recordid = 1"
Set db = CurrentDb()
Set rs = db.OpenRecordset(vKeys)

vLLen = LLength
vLHgt = LHeigth
VLWth = LWidth

rs.Close
db.Close
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top