Hi, I made a form that has 2 sub forms on it. The form is built on the employee's table.
Then I have an orders subform which is a place to add new orders for the customer I'm currently on.
Under that subform is another for inventory items, it's the place to add inventory for the perticular order selected in the orders subform above.
Everything appeared to be working great until I did more testing and found a glitch that I can't overcome.
I had 2 sample employee's in the database and a bunch of orders and inventory on each order. I added a dropdown box in the header of the form which allows me to select an employee and the form changes with that employee's information and then in the order subform shows that employees orders and the inventory subform show the correct inventory for that order.
All great up to that point here's where the problem comes in.
I decided to delete all the orders on both employees to see what would happen, glad I did. After doing that the main form with everything on it would load properly, all that would show is the header which only had the combo box in it with the names inside but selecting either name just kept the form empty.
I went through the properties and noticed I shut off additions so after turning that back on the form now completely loads however when I select a name from the combo box it won't populate the employee fields on the form. If the employee has orders already it will do what it should, it only acts up when the employee is new with no orders.
So I manually added orders back to the existing employees and the form works glitch free, then I add a new employee and the combo box won't load the new employees info on the form. If I select an employee in the combo box that has orders it will populate the employee fields.
This is the code I have in the query builder for the form under the employeeID in the criteria.
Code:
Like [forms]![Orders].[myselector] & "*"