Problems when add data into a sub form

nglee

New member
Local time
Tomorrow, 02:21
Joined
Aug 12, 2008
Messages
9
could anyone help me on this problems....many thanks
 
Basically, you are trying to add a record to a table who's relationship is a child of another table.

So .. if you have ParentTable and ChildTable and you tried to enter a record into ChildTable and there was no reference to the ParentTable you would get this error.

I would assume the foreign key (of the ParentTableID) is not being updated when you create a record in ChildTable.

-dK
 
Can you share the file elsewhere other than rapidshare please?

I will look at it then and possibly give some answers.

T
 
Can you share the file elsewhere other than rapidshare please?

I will look at it then and possibly give some answers.

T
Hello, which online sharespace is convenient for you to dl the file.

I will upload in that sharespace, thanks for your help
 
Hey, here is my zip file, could you help me to take a look~ thanks
 

Attachments

Hello, anyone can help me on this problems. I had done it for many times but don't where I get the errors.

thanks thanks
 
hello, i have tried it for several times but i still cant get a solution, could anyone give me a help. thanks a lot
 
First .. in you order entry form ...

BOUND the StaffInfo and CustomerInfo combo boxes to their respective fields. These fields have to have something in them or the record won't save because of your relationships. (See how your ProductID combo box works in your subform. In design mode it doesn't say 'unbound' but has a field name in it.)

Second, you have ReadyTime as required so you have to have something in it also.

-dK
 
First .. in you order entry form ...

BOUND the StaffInfo and CustomerInfo combo boxes to their respective fields. These fields have to have something in them or the record won't save because of your relationships. (See how your ProductID combo box works in your subform. In design mode it doesn't say 'unbound' but has a field name in it.)

Second, you have ReadyTime as required so you have to have something in it also.

-dK

Where could I bound them in M$ access? Could capture a print screen?
 
I am assuming you built this database? .. and familiar with clicking on the orders entry table and then going into design mode?

I am also assuming that you know how to look at the properties of a combo box? and/or how to use the combo box wizard? .. those two I highlighted in my previous post?

-dK
 
First .. in you order entry form ...

BOUND the StaffInfo and CustomerInfo combo boxes to their respective fields. These fields have to have something in them or the record won't save because of your relationships. (See how your ProductID combo box works in your subform. In design mode it doesn't say 'unbound' but has a field name in it.)

Second, you have ReadyTime as required so you have to have something in it also.

-dK
I have make a new combo box, and try to bound the data in the design mode by using the stafffullname query, but it still haven't bound? why? could you give me more hints on it. thanks
 
In design mode of your OrderEntry form, delete that combo box and start a new one ...

Let's do the CustomerInfo one with the wizard ...

Tell it to look up the values in a table (Customer).
For the fields, user CustomerID and CustomerName.
Hide the key column (should check by default).
Store the value in the CustomerID field.

Now for the StaffInfo one with the wizard ...
Tell it to look up the values in a table (Staff).
For the fields, user StaffID and StaffName.
Hide the key column (should check by default).
Store the value in the StaffID field.

Save it all and try it out ...
Make sure you put something in ReadyTime or the record won't save.

-dK
 
Errors in combo box & others

Sorry for only getting back to you now. I was burgled this morning and my notebook was stolen, so I'm responding on a machine that i am still setting up - ie lots & lots of down time between everything.

I reckon DKinley has already answered your questions in that the problem clearly lies in the way that you have used the Staffname and CustomerInfo combo boxes.

If you go into the properties of the 2 combo boxes the first thing that you need to do is change the control source of each of these to StaffID and CustomerID respectively.

The second thing is that you should change the rowsource of the customerID combo box to :
SELECT Customer.CustomerID, Customer.CustomerName
FROM Customer
ORDER BY Customer.CustomerName;

You should also change the rowsource of the StaffID to:
SELECT Staff.StaffID, [GivenName] & " " & [LastName] AS FullName
FROM Staff
ORDER BY [GivenName] & " " & [LastName];

The reason for these changes are so that the first column will look at the primary key of the lookup table and sort the information alphabetically for the user's convenience.


Then change the number of columns to 2 in the column count section. Set the column widths to 0;4cm so that the first column (the one with the primary key) is hidden from the user.

The rest should work comfortably.

Sean
 
Oh man. Major bummer on the burgle. =[

I hope you didn't lose alot of stuff.

-dK
 
I had a really nice tablet notebook. Didn't take a full backups for the last couple months. Had at least a 1 week old backup of the current project I am working on and I had set up my email system to deliver & receive from 2 seperate locations, so I won't have to be out of commission for too long.

Very frustrating...
 

Users who are viewing this thread

Back
Top Bottom