jcaptchaos2
Well-known Member
- Joined
- Sep 24, 2002
- Messages
- 1,032
- Office Version
- 365
- Platform
- Windows
Hello,
I need help with the Dlookup function, here is my formula, I can't seem to get it to work but in the past have been able to get other Dlookup formula's to work with lots of messing around. I am hoping someone can tell me what I am missing. I am going to break this down as I understand it and then maybe someone could explain. "ItemNumber=" this is the text box that will be filled in with the reusult of this formula. "Dlookup("[itemnumber]","[Shoporderstatus]" this is the field name and the name of the table that I am pulling the data from. "[shopordernumber]= " & [Forms]![shop_floor_data_entry]![shopordernumber]) is (shopordernumber) field name in the [shoporderstatus] table and the & [Forms]![shop_floor_data_entry]![shopordernumber]) part is [shopordernumber] is the name of my combo box on form [shop_floor_data_entry] Does that make any sense at all? I have this in the after update event in the shopordernumber combo box.
Code:
ItemNumber = DLookup("[itemnumber]", "[shoporderstatus]", "[shopordernumber]= " & [Forms]![shop_floor_data_entry]![shopordernumber])
I need help with the Dlookup function, here is my formula, I can't seem to get it to work but in the past have been able to get other Dlookup formula's to work with lots of messing around. I am hoping someone can tell me what I am missing. I am going to break this down as I understand it and then maybe someone could explain. "ItemNumber=" this is the text box that will be filled in with the reusult of this formula. "Dlookup("[itemnumber]","[Shoporderstatus]" this is the field name and the name of the table that I am pulling the data from. "[shopordernumber]= " & [Forms]![shop_floor_data_entry]![shopordernumber]) is (shopordernumber) field name in the [shoporderstatus] table and the & [Forms]![shop_floor_data_entry]![shopordernumber]) part is [shopordernumber] is the name of my combo box on form [shop_floor_data_entry] Does that make any sense at all? I have this in the after update event in the shopordernumber combo box.