Hello all, I am working on a metering fault database (for electricity, gas and water meters), to help us track and record all faults. I have created my first access database (after much trying) and have hit an issue. The database currently consists of two tables (Meter Details) and (Faults), and an input form (Meter Fault Form). Meter Details contains all the useful meter information (Meter_ID, Building, Alias, etc) and Faults will contain the Meter Id, the type of fault, comments and who raised the issue.
The form is linked to the Fault table, and there is a linked text box for Meter ID, Building, Date and Actioned By. The idea is that the user will fill these in and it is saved to the Fault Table. This bit works ok. I have also included several text boxes with Dlookups to bring up meter information (building, alias, etc) when the user enters the meter ID in the Meter ID box.
For the dlookup for the building name I have used
DLookUp("[Building]","Meter Details","[Meter_ID] = '" & [Forms]![Meter Fault Form]![Meter_ID] & "'")
This results in a blank text box. However if I create a new text box, and enter the meter id, it works (using the code below)
=DLookUp("[Building]","Meter Details","[Meter_ID] = '" & [Forms]![Meter Fault Form]![text101] & "'")
It looks like the issue lies with how I am referencing Meter_ID in the Dlookup. Any clues?
Thanks
(i have added in my database)