The expression in red is in the query and returns the result wanted. I have to do it in code on the form for “Wek_ID075a” must be in the table to link the query q01Week to “Wek_ID075a”. If I do an expression in the query “Wek_ID075a” is not in the table.
Wek_ID075a: DLookUp("Wek_ID075","q03WagesProcessingx","WgsPrcI D075 =" & 1)
Adding a write able field “Wek_ID075a” in the table and query, and trying the same expression in blue on the form VBA returns Null. It is linked on an event “Click” of the only combo box on the form. This expression retrieves a number from its own query. I tried adding Me! In fornt of field names, see in green but it errors.
Me!Wek_ID075a = DLookup("Wek_ID075", "q03WagesProcessingx", "WgsPrcID075 =" & 1)
Me!Wek_ID075a = DLookup("Me!Wek_ID075", "q03WagesProcessingx", "Me!WgsPrcID075 =" & 1)
Wanting to keep it short, but here is what I am trying. If you have an answer for above no need to read further.
The single control(combo) on my wages form is the wages date. There is a query storing the active employees for that week. Clicking on that field it appends the active employees to the table “t03WagesProcessingx”, and they end up in the query. The form is not an input form, just a set up that sets up a comprehensive report. One click gives the selected weeks wages. Waiting two minutes for the result means I must program better. The field "Wek_ID075" is bounded to the one combo(Image). It results in only the first line showing the ID. My need is to get the ID in all the rows, by an expression from the form. Any other ideas?