473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Northwind question

Hi,
I found this post on the forum in order to get an explanation of the customer ID allow autmatic populate of fields in the order form. However, I followed same procedures from the northwind and do it on my form, and it doesn't work. Can anyone tell me why? thanks

esca007


Open the Orders form in design view.
Open the Properties box.
Ensure the Title of the Properties box says "Form" so you are looking at the
properties of the form, not those of a text box.
Locate the Record Source property (Data tab).

The Record Source is a query.
Open the query in design view.
You will see that the query contains two tables - Orders and Customers.
When you select CustomerID on the form, the query automatically fetches the
matching details from the Customers table.

When you combine multiple tables in the query that is the Record Source of a
form, if you are not careful you will end up with a read-only form, or one
that cannot accept new records, or one that deletes information from the
wrong table (e.g. deleting the customer when all you wanted was to delete an
order).

In general, you are safe if all the editable fields are from the related
table (the "many" side of the relationship), and the other table is just
used as a lookup. That is the case in the Northwind example. In addition,
you will notice that the text boxes bound to fields from the Customers table
(such as the Address field) have their Enabled property set to No and their
Locked property set to Yes. This helps prevent unintentional changes.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"Mark" <mcunni01@uoguelph.ca> wrote in message
news:14801530.0310060404.57837282@posting.google.c om...[color=blue]
> OK, on the Form called Orders, there is a combobox that allows you to
> select customers. The form then populates all the textboxes below it
> with the customer information (called: address, city, region, etc...)
>
> How does it populate these textboxes. I have looked in the afterupdate
> function for the combobox but there is nothing no code in there that
> populates the textboxes mentioned above. What is access doing and how
> do you set it up???
>
>
> Thanks[/color]
Sep 24 '06 #1
3 2306
PEB
1,418 Expert 1GB
What is your Source query?

have you done the relationship bwn Table Orders and Customers? Have you addes the neded fields from Customers?

In fact when you type your Customer ID the rest of information should appear...

If there is a good relation only ID with ID you can edit the table orders and it should't be locked!

Best regards!

:)
Sep 24 '06 #2
Hi,
All the fields are actually from the same table. I have a customer table with customer ID, name, age. They're all in the same table. I put these on a form, and I make customer ID combo box. But when I use the customer ID box to show customer name and age, only the customer ID is changed. The rest stays the same. For instance, the form initially shows ID 122, name John, age 12. If i drop downa and choose ID 123, name and age of ID 123 will not come up even though in the table there's name of Sam and age of 13. John and 12 stays in those boxes. I don't know why it's like that. Please help. thanks

esca007
What is your Source query?

have you done the relationship bwn Table Orders and Customers? Have you addes the neded fields from Customers?

In fact when you type your Customer ID the rest of information should appear...

If there is a good relation only ID with ID you can edit the table orders and it should't be locked!

Best regards!

:)
Sep 24 '06 #3
PEB
1,418 Expert 1GB
So in your case... you need other thing....

Change the control source of the combo box! Now it's Customer ID it must be blank!

It have to be unbound!

Name this field MyID

Then in the recors source of your Form type

SELECT * FROM Customers WHERE CustomerID=[Forms]![MyFormName]![MyID]

Don't copy Paste directly this statement do the changes!

Customers is your table with Customers
CustomerID is your ID int this table

In the Field MyID you need to create an After Update event procedure in which you eneter:

Me.Requery


It's everything!

Best regards!
:)
Sep 25 '06 #4

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

Similar topics

1
by: SilasTheSailor | last post by:
Hi everyone I am new to this and have tried to customize the northwind.mdb to my company. My problem is that after an order is written the number of items in stock does not get automatically...
8
by: RibGnaw | last post by:
Long, long ago when Access 97 first hit the streets a sample database called Northwind was shipped with it. At that time a number of articles had been posted on the correct procedure to remove all...
1
by: Allen | last post by:
Hi All, Have been using access for some time on a limited basis.I was playing around with the Northwind database and I have a question for you all. I was looking at the Products form and it give...
15
by: Jerry Alexander | last post by:
The Northwind Order Entry Application database is great! ----------------------------------------- But one thing is lacking: Real-time Stock Qty calculation!...
8
by: xtra | last post by:
Hi Folk I looked at the Northwind Sample Database for the first time recently and I was just wondering why they made it so ugly. If northwind is supposed to be inspiring to young and hopeful...
2
by: dennist685 | last post by:
Can't open Northwind I remembered doing walkthrough using Northwind. However it wasn't an http project but a file project using the development server. Northwind allowed me to add, edit and...
2
by: JohnnyBoy | last post by:
I am learning to program C++ .net and am having difficulty with one of the exercises and wondered if someone could help? I am including the code for a console app I wrote according to the exercise...
5
by: Harlan Messinger | last post by:
I installed the Northwind database in my SQL Server developer version, added to the server logins, and in OSQL ran use Northwind GO grant all to GO These executed without error. But my...
1
by: esca007 | last post by:
Hi to all access expert out there, Regard this post about the fact that the order form on northwind is read only format. So can anyone tell me how to make it in edit mode so that I can change/add...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.