Ok, so for my training for where I work I am learning how to filter subforms using a form and on top of that, how to use Dlookup's on the subform that correlates to a related table of the table the subform is based upon. So, for example:
Form A has Form B as Subform
Form B needs to have data filtered on what Form A has chosen (through combobox)
On top of this, there needs to be 2 subforms of Form B to compare the different Filters.
---------------------------- The above part I can get on my own
Now here is where everything goes down hill...
Form B is connected to tblOne but some of the data is in a relationship with tblTwo. I need Form B to take the data from tblOne and grab the data from tblTwo using a Dlookup.
Here is the coding I have tried so far:
Code:
=DLookUp("[WeaponName]","tblWeapons","[WeaponID] = " & "'" & [WeaponID].[Value] & "'")
Code:
=DLookUp("[WeaponName]","tblWeapons","[WeaponID] = " & "'" & [WeaponID1].[Value] & "'")
Code:
=DLookUp("[WeaponName]","tblWeapons","[WeaponID] = " & "'" & [WeaponID1] & "'")
----------------------------
I keep getting the ?#Error thing.