dlookup

gtsek

New Member
Joined
Apr 16, 2018
Messages
4
Hi . I have 2 tables , mobile number is the relation shipped data one to many.
first table has client data name, surname etc
second table has mobile number and visit details
i have a form for 2nd table and i put 2 labels . I need when i put the mobile number (afterupdate vba) first label caption be the name from first table and
second label caption be the surname for first table also.
i have in module 3 variables 1 integer for mob number and 2 string for name - surname
Private Sub kinito_AfterUpdate()
i = kinito.Value
n = DLookup("(onoma)", "pelates", "(kinito)=i")


Lname.Caption = n
Lsurname.Caption = s
End Sub


EDIT:
i try to say that :
variable n is from table pelates field onoma when field kinito=1
 
Last edited by a moderator:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi, try:

n = DLookup("[onoma]", "pelates", "[kinito]=" & i)
 
Upvote 0
Hi, try:

n = DLookup("[onoma]", "pelates", "[kinito]=" & i)


thanks
i do it like this
n = DLookup("[onoma]", "[pelates]", "[kinito] =" & Forms("episkepseis")("[kinito]"))
and works... your is simple. i will try
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top