TheCandyman
Technical User
I have two forms(frmMain, frmCourse), when i am in my first form, the user can click on an item, it stores that code which is a number and opens frmCourse. I want it to filter the frmCourse.CourseID(also a Number) so it only shows the items with the code matching from the previous form. This is what i have in my frmMain that opens the next form:
Not Working
Dim varName As Variant
varName = DLookup("[tmpNumber]", "tmpTable")
'DoCmd.OpenForm "frmCourse", , , "[CourseID] = '" & varName & "'"
This one works, but only opens the form
DoCmd.OpenForm "frmCourse", , , acFormEdit
What do i need to fix on the DoCmd??
Not Working
Dim varName As Variant
varName = DLookup("[tmpNumber]", "tmpTable")
'DoCmd.OpenForm "frmCourse", , , "[CourseID] = '" & varName & "'"
This one works, but only opens the form
DoCmd.OpenForm "frmCourse", , , acFormEdit
What do i need to fix on the DoCmd??