473,499 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a simple form to Add new records to the table Orders

7 New Member
Hi

my Data Base consist of the following tables:
Customers,Products, Suppliers,Orders,Orders_Details

the relationships are as follow

Customers-Orders ( one to Many relational field customer-id)
Supplier-Products(one to many relational field supplier-id)
orders-orders_Details( one to many relational field order-id)

I have the information of my orders divided in 2 tables (orders, orders-details). the fields of the orders tables are the Order-id customer-id, Date. the Fields of the orders-details
are ID(primary key),Order-ID, customer-id,Product-id,quantity, in this table each product from each order gets his own record.

I'm trying to build a simple form, in order to introduce new orders,when i do the form the form displays the information correctly, but when i try to add a new record the customer-id of the form(orders) and the customer-id of the sub-form(Orders-details) doesn't match, allowing me to introduce details to a different customer
May 13 '14 #1
6 1740
JenZzz
9 New Member
If you are trying to create a form on which you can add records to multiple tables at once, use an unbound form and multiple recordsets.
If not, please be more specific.
May 14 '14 #2
abadaysheker2
7 New Member
Yes i'm trying to create a form to add records to the orders table and the orders-details table.

can you explain me how to create the unbound form with details, because i'm new into access
thanks
May 14 '14 #3
JenZzz
9 New Member
A form is unbound when the 'record source' of the form is empty. You can check this in the data tab of the propertysheet.

Creating the form itself is simple. In the create tab above you can start by creating a blank form et voila.
Next, go into design view and after creating some textboxes you can enter the Visual Basics Editor.

Assuming you have basic knowledge in visual basic, you can start asigning the values in the textboxes to the appropriate fields in the tables. Explaining how to create unbounds forms from scratch however is going to take a bit much of my time.

I'd suggest you start creating the Form itself and just see how far you will come using your imagination (And google!) :). You can always come back and ask something more specific!

Good luck!
May 14 '14 #4
jimatqsi
1,271 Recognized Expert Top Contributor
abadaysheker2,
It sounds like you do not have the links between the forms established. When you click once on the subform look at the properties Data tab. You will see child and master links. You can set those so the customer ID of the master links to the equivalent ID of the sub-form. You may need more than one field to make the link, no problem, several can be used.

Jim
May 14 '14 #5
JenZzz
9 New Member
Am I correct in saying that depending on whether or not you are trying to make a multi-user enviroment you either choose an Unbound Form for multiple users or a Bound form for a single user? Depends on the use for your database, abadaysheker2!
May 14 '14 #6
jimatqsi
1,271 Recognized Expert Top Contributor
Normally bound forms are the way to go. Especially for the new Access developer. Unbound forms require manual code to populate each object on the screen. It also means you cannot work with a continuous form, only Single forms.

Spend some time with the sample database, Northwind.mdb. There's lots and lots of good examples in there. You should be able to find it under your Help menu.

Jim
May 14 '14 #7

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

Similar topics

7
2953
by: r0adhog | last post by:
I have a very simple form: <html> <head> </head> <body> <% function ValForm() if len(document.form.newapp.all("AccessCode").Value) = 4 then document.form.newapp.submit()
1
1941
by: Don Stefani | last post by:
Hello, I have a form that I want to submit "onchange", OK I've got that working, but when the form submits, I want to pass along a value to a CGI script, as if that value was in a hidden form...
2
7947
by: Bill Hand | last post by:
Is it possible to open a form from table and have it access a given record? I want to be able to query all baseball cards with the last name Jones and have it open a table. In each record of...
1
293
by: Randy Lucero | last post by:
I have a question for all you experts out there. I have created an Order Entry form that displays a Customer Name from a table called "CustList". That table also contains the usual.. address,...
1
1642
by: sunrisewinesalon | last post by:
New here--I posted this to another group called 'ms access problems,' but it only had one member... Access says you can choose fields from more than one table or query to create a form--but can...
1
1633
by: VM | last post by:
I would like to display a child form inside of an MDI but the problem is that I'll be invoking that child form from within another child form. If I use this code: frmReportViewer frmReportViewer =...
3
6177
by: KayC | last post by:
Hi Background info: I am running Access 2000 I have a form bound to a blank table When a user clicks a button the form opens in datasheet view User enters data into form and closes form User...
2
2293
by: adwest | last post by:
Forgive me if this is a foolish question. I "play" in Access and have only created a few rather simple relational databases. My knowledge and experience is limited. I have no formal training, just...
1
7239
by: xraive | last post by:
I have a problem with this. Currently I am trying Allen's code and i am not successful. Current Design Table1 (Main Form) TravelID (PK) ApprovedBY EntreredBy BudgetCode ExpenseCode
1
6349
by: Sven Willgren | last post by:
Hello All, While trying to open a form I get the following error: An error occurred creating the form. See Exception.InnerException for details. The error is: Index was out of range. Must be...
0
7128
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7385
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
5467
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,...
1
4917
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.