Originally Posted by
Edgar
If you have many records then you also need to be able to search and still use the string method I mentioned, it's pretty simple really. Attached you will find 3 approaches:
1. the continuous form with temporary table approach, I don't really like it though
2. the string method with a list of lots as continuous form + search functionality (double click on lot_number to add lots)
3. the string method with a list of lots as listbox + search functionality (double click on row to add lots)
All of these methods are great! They like the continuous form with temp table so I am going through with that.
Now I have a different issue. (I was thinking about making a separate thread for it but it is relevant to this as well and I wasn't sure so I just added it to this thread.)
I have some fields I want them to be able to enter that aren't in the original lots table. Such as Quantity, length, etc.
So on the report I am trying to use a Dlookup as a control source but I am getting a type error even though both the ID and the Autonum are integers (Well technically the Autonum is an Autonumber but I am pretty sure int's can compare to an autonum without needing the CInt I included right?)
Code:
=DLookUp("Quantity","TempPullsTableTest",CInt([Autonum])=[TempPullsTableTest].[ID])
'or
=DLookUp("Quantity","TempPullsTableTest",CInt([Autonum])=[TempPullsTableTest]![ID])
Using this it prompts me to enter the value for TempPullsTableTest. No matter what I enter I get #Name? for using a '.' to reference the table and #Type! when I use '!'.
I am not sure whats wrong with this syntax?
The record source for the report is a query that pulls a bunch of fields from the Lots table so that it can fill a lot of controls on the report so I figured it would be easier to use a DLookup rather than figure out how to add the fields from TempPullsTableTest into the Query.