Not In The List (1 Viewer)

Sticky99

Registered User.
Local time
Yesterday, 21:21
Joined
Nov 9, 2019
Messages
61
Would it be possible for somebody to point in the right direction with an issue I have with Not In The List option on a Combo box.

I have a form for ordering parts with a sub form within for selecting the part, What I am trying to achieve is input a new part number into the Combo box which, if not in the table, brings up a message box with the option to add a new part. If Yes is selected then this would open the Parts Form to input the detail, when this form is saved you are returned to the Orders Form with the new part highlighted in the combo box.

This is what I have at the moment but I keep getting an error as highlighted below.

1586553497245.png


1586553511393.png


Any help or advice would be gratefully accepted, or if you have an alternative option?

Thanks Guys.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:21
Joined
Oct 29, 2018
Messages
21,528
Hi. The first argument of the Append2Table() function expects a Combobox object. It looks like the name of your Combobox is Combo19, but you're passing "PartNoID" to the function instead.
 

Sticky99

Registered User.
Local time
Yesterday, 21:21
Joined
Nov 9, 2019
Messages
61
Hi. The first argument of the Append2Table() function expects a Combobox object. It looks like the name of your Combobox is Combo19, but you're passing "PartNoID" to the function instead.
Thank You TheDBGuy, couldn't see that for looking.! Is there a way to get the part number to auto populate the "Part No." field when the New Part form opens?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:21
Joined
Oct 29, 2018
Messages
21,528
Thank You TheDBGuy, couldn't see that for looking.! Is there a way to get the part number to auto populate the "Part No." field when the New Part form opens?
Sure, either pass it as an argument to the function or grab it from the form when the function runs. When a form is open, you can use the Forms!FormName.ControlName syntax to get a value from it.
 

Sticky99

Registered User.
Local time
Yesterday, 21:21
Joined
Nov 9, 2019
Messages
61
Sure, either pass it as an argument to the function or grab it from the form when the function runs. When a form is open, you can use the Forms!FormName.ControlName syntax to get a value from it.
I have another issue before i make an changes as you suggest, I get this error:
1586567814021.png

Do you know why I get this?

Thanks again theDBGuy.
 

Users who are viewing this thread

Top Bottom