Get in VB the value of a field in a table

samuvk

Registered User.
Local time
Today, 00:46
Joined
Mar 3, 2010
Messages
24
I am trying to be able to store in a variable in Vb the value of a certain field from a table.

Let say that I have table1, which field are ID, Name

ID Name
1 Jhon
2 Eric
3 Sam
4 Anna

I want to get the value of the last ID existing in the table1.

So I looking for how can I get the number 4 from ID field in table1 in VB.

Something like:

Dim ID as integer

ID= table1.ID

Thanks
 
Checkout the functions DLookup and DMax or search this forum - I do believe I saw this problem solved in the last 3 weeks.

Also, refer to your last post where I posted a link for reserved words ...

HTH,
-dK
 
I already found an alternative solution.

Thanks anywya
 

Users who are viewing this thread

Back
Top Bottom