how do i reference another value on a record?

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

Guest

this is my table

searched-by(column) user(column
bill M. bill
john C. John
bob S. bob

I using Dcount() to find "Johnc" on the table, now how can i reference it to the 1st column of so i can get ""john C." into a variable ??? there are no Primary key on this table. HELP!!!!!!!!!!!!!!
 
Check Access / Access VB Hrlp on DLookUp() function (similar to DCount).

--
HTH
Van T. Dinh
MVP (Access)


luis said:
this is my table:

searched-by(column) user(column)
bill M. billm
john C. Johnc
bob S. bobs

I using Dcount() to find "Johnc" on the table, now how can i reference it
to the 1st column of so i can get ""john C." into a variable ??? there are
no Primary key on this table. HELP!!!!!!!!!!!!!!
 
MyVariable = Dlookup("[SearchedBy]","MyTable","[User] = 'Johnc'")

or

MyVariable = Dlookup("[SearchedBy]","MyTable","[User] = '" _
& Forms!MyForm!UserTextbox & "'")


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com



luis said:
this is my table:

searched-by(column) user(column)
bill M. billm
john C. Johnc
bob S. bobs

I using Dcount() to find "Johnc" on the table, now how can i reference it to
the 1st column of so i can get ""john C." into a variable ??? there are no
Primary key on this table. HELP!!!!!!!!!!!!!!
 
Van,

Great minds think alike! Check the time of both our posts ---

Steve
PC Datasheet
 
Back
Top