I have a form that I fill out that has 2 fields - PSN_Number &
Channel_Number. What I want to achieve is for another field to auto populate
with data from a 3rd field (Degraded_Serial_Number) which is dependant on
what is entered in the 2 fields above. I have a table that corresponds this
info - HDD_List. No matter what I have tried, I cannot get it to work.
Below is the code that I am using:
Private Sub Channel_Number_AfterUpdate()
On Error GoTo Err_Channel_Number_AfterUpdate
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "Channel_Number = " & Me!Channel_Number
' Look up HDD Serial Number and assign it to Degraded Serial Number
Me!Degraded_Serial_Number = DLookup("HDD_Serial_Number", "HDD_List",
Adding the criteria to the DLookup line is where I am lost. Hopefully
someone can point me in the right direction.