I'm probably missing something simple here, but I've been scratching my head at this one for a while now so hopefully someone here can point out what it is.
I've got a continuous form called 'fsubEditPorts' that's based on a query which contains information about network ports on devices, i.e. what the port is called, what the IP address is, the port and device it's connecting to, etc.
On fsubEditPorts is a text box called txtIDdev that's linked to the field 'ID_device'(the device the port is connecting to), and a combo box called cmbIDport that's linked to the field 'ID_port'(the port being connected to). These fields won't always have a value in them because not every port on every device is in use.
My goal is, if a user wants to change what port is being connected to they can use cmbIDport to see a list of all the ports on the destination device and pick the one they're looking for.
To do this I set criteria in the row source of the combo box to only show ports tied to a device with the same ID as 'txtIDdev'.
Code:
[Forms]![fsubEditPorts]![txtIDdev]
This resulted in an 'Enter Parameter Value' prompt for '[Forms]![fsubEditPorts]![txtIDdev]'. I assumed this was because txtIDdev was null in some records, so in the query that fsubEditPorts is based off of I set ID_device to be 0 if there was no value for it. This worked fine, 0's are in that field where there would normally be nothing, and 0 will never match an actual device ID.
I assumed this would cause the combo box to be blank in these records since the query would find no matches for 'ID_device = 0', and fill properly on the rest.
However, I'm still getting the same error "Enter Parameter Value '[Forms]![fsubEditPorts]![txtIDdev]'" when I open the form. I can't seem to figure out why, since txtIDdev will always have a value in it. If anyone knows what I'm missing please let me know.
I apologize if I rambled a bit here and gave a lot of useless information. On the flip side, if more information is needed I'd be happy to provide it. Thanks in advance!