Thanks in advance for any help rendered!
I have a form that I am using several lookups on to check values used in conditional statements. I have cluttered the form with hidden text boxes to hold the values of one lookup so that I can pass them to the next lookup.
The top lookup works fine but again I am needlessly holding the value in a hidden txt box. I used search and found some examples of how to pass the varible NextPMDate, but I can't seem to get it too work. Would someone please look at it and explain what I am doing wrong?
Me.txtValueHoldrForNextPm = NextPMDate
NextPMType = DLookup("[PMType]", "[dbo_tblWorkOrder]", "[Dept]= [cmbDept] And [LineNum] = [txtLineNum] and [ScheduledDate] = [txtValueHoldrForNextPm]")
NextPMType = DLookup("[PMType]", "[dbo_tblWorkOrder]", "[Dept]= [cmbDept] And [LineNum] = [txtLineNum] and [ScheduledDate] = " & NextPMDate)
Again thanks,
Lee
I have a form that I am using several lookups on to check values used in conditional statements. I have cluttered the form with hidden text boxes to hold the values of one lookup so that I can pass them to the next lookup.
The top lookup works fine but again I am needlessly holding the value in a hidden txt box. I used search and found some examples of how to pass the varible NextPMDate, but I can't seem to get it too work. Would someone please look at it and explain what I am doing wrong?
Me.txtValueHoldrForNextPm = NextPMDate
NextPMType = DLookup("[PMType]", "[dbo_tblWorkOrder]", "[Dept]= [cmbDept] And [LineNum] = [txtLineNum] and [ScheduledDate] = [txtValueHoldrForNextPm]")
NextPMType = DLookup("[PMType]", "[dbo_tblWorkOrder]", "[Dept]= [cmbDept] And [LineNum] = [txtLineNum] and [ScheduledDate] = " & NextPMDate)
Again thanks,
Lee