By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,454 Members | 2,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,454 IT Pros & Developers. It's quick & easy.

data existence

P: 53
Hello, i seem to have soem trouble on my on going project.
I am doing this on a shop, and to make and order with the calculated fields i have created a query, however how do i make sure when making the order that when i enter details such as the customer ID, and staff ID, that they exisit in the tables.
i have put the table "Customer Order", into a form but would like the database to checck that the entered Staff_ID from the table "Staff" and "Cu_ID" from Customer, exist, and therefore not to carry the order out as they do not exist
Feb 5 '07 #1
Share this Question
Share on Google+
7 Replies


Rabbit
Expert Mod 10K+
P: 12,315
Hello, i seem to have soem trouble on my on going project.
I am doing this on a shop, and to make and order with the calculated fields i have created a query, however how do i make sure when making the order that when i enter details such as the customer ID, and staff ID, that they exisit in the tables.
i have put the table "Customer Order", into a form but would like the database to checck that the entered Staff_ID from the table "Staff" and "Cu_ID" from Customer, exist, and therefore not to carry the order out as they do not exist
You could have them select the Customer ID and Staff ID from a combo box whose values are limited to the list.
Feb 5 '07 #2

P: 53
You could have them select the Customer ID and Staff ID from a combo box whose values are limited to the list.


how do you do this?
is it in the queryt of form. i tried both but do not know what to do
thank you for you help, i am really greateful
Feb 5 '07 #3

Rabbit
Expert Mod 10K+
P: 12,315
You do it in the properties of the combo box on the form.

In the properties is an option to limit the choices to the list.

The Row Source of the combo box is the list. The Row Source can be a table, query, or a list of values that you type in.
Feb 5 '07 #4

P: 53
You do it in the properties of the combo box on the form.

In the properties is an option to limit the choices to the list.

The Row Source of the combo box is the list. The Row Source can be a table, query, or a list of values that you type in.
thank you this worked. however i could not do this for the field "Prod_Name", on the query. this came form the "Products" table.
is this because ots not a proimary key
Feb 5 '07 #5

Rabbit
Expert Mod 10K+
P: 12,315
It doesn't have to be a primary key.
When you say it doesn't work, what do you mean?
The values don't appear?
The values aren't limited to the list?
Feb 5 '07 #6

P: 53
It doesn't have to be a primary key.
When you say it doesn't work, what do you mean?
The values don't appear?
The values aren't limited to the list?

Its ok i figured it out, i used a query builder instead.
thank yopu so much for your help you have been great, and i really appreciate the help give.
thank you
Feb 5 '07 #7

Rabbit
Expert Mod 10K+
P: 12,315
Not a problem, glad to be of help.
Feb 5 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.