Trying to update a field on a form to help the user when entering data (1 Viewer)

Jon123

Registered User.
Local time
Today, 14:04
Joined
Aug 29, 2003
Messages
668
I am trying to update just 1 field on a form. I has a temp table and I just want to display the history based off what serial number is selected. Iwas trying to put this code in the control source for that field.

Code:
 =DLookup("[temptablekitmove]", "[Parthistory]", "[Serial Number] = [part1c]")
 

Jon123

Registered User.
Local time
Today, 14:04
Joined
Aug 29, 2003
Messages
668
that would be the [serial number] on the form
 

WannaKatana

New member
Local time
Today, 18:04
Joined
Oct 1, 2017
Messages
11
=DLookup("[temptablekitmove]", "[Parthistory]", "[Serial Number] = '" & me.[part1c] & "'") if a string value.

=DLookup("[temptablekitmove]", "[Parthistory]", "[Serial Number] = " & me.[part1c]) if numeric

Sent from my SM-N910V using Tapatalk
 

Jon123

Registered User.
Local time
Today, 14:04
Joined
Aug 29, 2003
Messages
668
so I moved this code to the on open event of the form
Code:
Me.[part1history] = DLookup("[Tble-Qtz Kits All parts]", "[Part history]", "[Serial Number] = '" & Me.[Part1c] & "'")
When the form open I'm getting an error that access cant find input table or Query Part history ???
 

Jon123

Registered User.
Local time
Today, 14:04
Joined
Aug 29, 2003
Messages
668
Got it, Thank you for the help

Code:
Me.[part1history] = (DLookup("[Part History]", "Tble-Qtz Kits All Parts", "[Serial Number] = '" & Me![Part1c] & "'"))
 

Users who are viewing this thread

Top Bottom