dlookup help please for dunce here (1 Viewer)

murray83

Games Collector
Local time
Today, 04:56
Joined
Mar 31, 2017
Messages
728
brain fade starting

ok have a table with people and shifts they be on so i have this dlookup

Code:
=DLookUp("ShiftNo","tblStaff","Colleague = Forms![Form2]!Combo4")

Which i would like to then display the shift in a text box but all i get is a big blank nothing, no error codes, no #error in my text box

please help, the shifts are numbers and strings is that maybe one issue, i need to streamline the data into one type
 

Isaac

Lifelong Learner
Local time
Yesterday, 20:56
Joined
Mar 14, 2017
Messages
8,774
What happens if you try:

=DLookUp("ShiftNo","tblStaff","Colleague = '" & Forms![Form2]!Combo4 & "'")

(if your ShiftNo field is a text datatype)
 

murray83

Games Collector
Local time
Today, 04:56
Joined
Mar 31, 2017
Messages
728
What happens if you try:

=DLookUp("ShiftNo","tblStaff","Colleague = '" & Forms![Form2]!Combo4 & "'")

(if your ShiftNo field is a text datatype)

it is a texttype and still blank see attached ( all tables included hehe )
 

Attachments

  • Stock People Tracker - Copy.accdb
    528 KB · Views: 89

Gasman

Enthusiastic Amateur
Local time
Today, 04:56
Joined
Sep 21, 2011
Messages
14,231
You need to decide what you are using for the combo?
The bound field is ID not Colleague !
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:56
Joined
Oct 29, 2018
Messages
21,453
it is a texttype and still blank see attached ( all tables included hehe )
Hi. Pardon me for jumping in, but there's another approach, in your case, other than DLookup().
 

Attachments

  • Stock People Tracker - Copy.zip
    22.3 KB · Views: 91

Users who are viewing this thread

Top Bottom