Need help with a form. Combo box not updating to related table... (1 Viewer)

oZone

Registered User.
Local time
Today, 09:04
Joined
Oct 17, 2008
Messages
103
I'm new to access, still learning, just learned about forms this past week and am practicing building one that lets a user update or add new orders to existing customer orders, but it isnt working rite.

The form works for the most part, but there is one field that doesnt populate to a related table when I update the form (unsure why) and needed some help out why.

I've attached a sample database with the form. To add an order, the user should select the customer number first, then hit the "Add New Order" button, then enter a new order number, then move onto the subform where they can select items, enter quantity ordered, and prices.

As it is now, after selecting the customer number from a combo box and entering all the information for the new order, I check the Orders table and it shows the new order number, and date, but the Customer Number field is blank?

The form should populate the customer number along with the order date and order number to the Orders table but the customer number is being lost somewhere along the way... :confused:

Help?

Thanks!:rolleyes:
 

Attachments

  • oZone.zip
    42.6 KB · Views: 163

John Big Booty

AWF VIP
Local time
Tomorrow, 02:04
Joined
Aug 29, 2005
Messages
8,263
If you are talking about cboCustomerNum youv'e not actually bound to any thing.
 

oZone

Registered User.
Local time
Today, 09:04
Joined
Oct 17, 2008
Messages
103
yeah, thats the combo box i'm having trouble with. how would I bind it to something, and what would i bind it too?
 

John Big Booty

AWF VIP
Local time
Tomorrow, 02:04
Joined
Aug 29, 2005
Messages
8,263
You will need to bind it to your Orders Table, in which case you will need a field to store your Customer number.

The Combo Box Wizard should walk you through the process.
 

oZone

Registered User.
Local time
Today, 09:04
Joined
Oct 17, 2008
Messages
103
There is a field in the Orders table for customer numbers already, but after i've created a new combo box to select the customer number, it doesnt work. It gives me an error.

Heres what I'm doing to create the combo box (Let me know if i'm doing something wrong).

1) Select "Look up values in a table or query"
2) Select tblOrders for "Which table or query should provide the values"
3) Select the CustomerNum field for "Which fields contain the values you want"
4) Select CustomerNum Ascending sort order
5) Select Hide key column (because I only want the customer number displayed)
6) Store the value in CustomerNum field (not sure if i'm doing this part rite...)
7) Name the combo box and finish.

When I go to test the combo box I get an error when I select any customer from the drop down box. That error is "The field is too small to accept the amount of data you attempted to add". I dont understand how it could be too small? The customer number field in the Orders table is exactly 3 characters. So is the customer number I select...

Help?
 

oZone

Registered User.
Local time
Today, 09:04
Joined
Oct 17, 2008
Messages
103
**bump**

Need help getting this combo box to populate the customer number to the Orders table...Please?
 

oZone

Registered User.
Local time
Today, 09:04
Joined
Oct 17, 2008
Messages
103
How do I do that?

I tried writing this:
Code:
=tblOrders.Column(2)
in the textbox of the combo box in design view but it doesnt work...

I dont know how to "bind it to the correct column". Still learning access, sorry...
 
Local time
Today, 11:04
Joined
Mar 4, 2008
Messages
3,856
Right click it, go to properties, go to the data tab, and for Control Source select "CustomerNum".
 

John Big Booty

AWF VIP
Local time
Tomorrow, 02:04
Joined
Aug 29, 2005
Messages
8,263
Sorry, I've been away for the weekend. However it seems that georgedwilkinson has helped you out.

If all else fails delete the offending Combo and put a new one in from scratch.
 

oZone

Registered User.
Local time
Today, 09:04
Joined
Oct 17, 2008
Messages
103
hi, yeah, I got it working thanks a ton!

Now I'm studying normalization. It's a little tough to grasp the idea, but I'm slowly wrapping my head around the concept. I'm sure I'll post with questions about that too.
 

Users who are viewing this thread

Top Bottom