Question (1 Viewer)

Nicolette

Always Learning
Local time
Yesterday, 22:35
Joined
Jun 26, 2010
Messages
178
so can I use more than one subform in a form? since I apprently have to use the subform to autopop the customer info and to create the order
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
What do you want to populate?

You select the CustomerID and then you will have two sets of data showing on your Main Form.

One set is the fields displayed from your tblOrderHeader which will be OrderID (autonumber) OrderDate - you enter this. You can set the form control to use =Today() as default,

The Other is data from the tblCustomer which won't be in the tblOrderHeader.
You can use another SubForm - just a small one - to display this data and link it with CustomerID to CustomerID. This will be "Read Only" and you should make the text box controls properties to not allow any edits etc.
 

Nicolette

Always Learning
Local time
Yesterday, 22:35
Joined
Jun 26, 2010
Messages
178
I just wanted to autopop the customers name for verification purposes it dosen't get stored or anything just a security measure to make sure the order is beign created to the right customer
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
You can use many Sub Forms but normally you can do this task with a Main Form and One large subform to take the OrderDetails and maybe a smaller subform to show the Customer Name and Postal Address data on the main form.

You can get away without this smaller subform by using unbound text box controls and expressions to get the info from tblCustomer but this may be stage two.

Don't disspear as Access is like this. Quite a lot of work to set up but once done, very little to do later.
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
I just wanted to autopop the customers name for verification purposes it dosen't get stored or anything just a security measure to make sure the order is beign created to the right customer

That is the way it is done but of course, where is it coming from?? which is why a subform can do this.

get this form looking how you want and then you can add the Command Buttons to make it :

Add New Orders
View existing Orders
Allow Deletion - if you wish
Edit existing Orders

All four, or more options can all be done with the one form.
 

Nicolette

Always Learning
Local time
Yesterday, 22:35
Joined
Jun 26, 2010
Messages
178
ok thanks for the words of encouragement i was getting a bit frustrated. I wasn't sure if i was clearly explaining what i wanted, which i had seen done in sample databases I expected a ton of work which i am hopeful will be well worth it when i get it done
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
Your database should be small and when compacted and repaired you can always attach it to your post when really at wits end although you seem to be up to speed for now.
 

Nicolette

Always Learning
Local time
Yesterday, 22:35
Joined
Jun 26, 2010
Messages
178
yeah like i said before i got lost in all the "i wants" and the "i needs" for the database that are in my head so your words of guidence really help me!
 

Nicolette

Always Learning
Local time
Yesterday, 22:35
Joined
Jun 26, 2010
Messages
178
ok i'm almost done but now i'm running into another problem and I haven't been able to find a solution but i'm not sure what to call the problem either. When I enter the price as 0.99 it rounds it to 1.00.
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
Check the table and see what is in that, if .99 then it should just be the Form's text Box Control format property.

This should be set to Currency and two decimal places.

Sometimes you can use an expression to get the rounding exact as the opposite can be a problem where the Invoice Total on the form/Report is 1cent out because you see .99 but it really is .99567834:eek:
 

boblarson

Smeghead
Local time
Yesterday, 21:35
Joined
Jan 12, 2001
Messages
32,059
most likely the data type is set in the table to INTEGER or LONG INTEGER and should be set to currency instead (as Bill said).
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
See attached Database (access 2000).

QryOrderTotal
This query also calculates the OrderDetail sales total including Sales Tax and Round's the result to two decimal places.

QryCustomerSalesTotal gives you sales summed by Customer and it includes Nz([fieldname],0) to avoid Null values which will make a mess of your calculations.

FrmSales shows how a form can display data from the record source and have an unbound text box control to do a calculation.
 

Attachments

  • SalesRecords.mdb
    208 KB · Views: 104

Nicolette

Always Learning
Local time
Yesterday, 22:35
Joined
Jun 26, 2010
Messages
178
ok here is what I have so far... Test it and what not sometimes it works the way i want it to sometimes it doesn't so see if you can see any problems because I can't find them....:confused:
 

Attachments

  • SWC DB Test.accdb
    1.2 MB · Views: 102

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
Can you save the Database in an earlier format like 2000??

I use 2000 and can't read the attachment
 

Nicolette

Always Learning
Local time
Yesterday, 22:35
Joined
Jun 26, 2010
Messages
178
it won't let me it says It uses freatures that are required and not avaliable in later versions of access
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
:eek: May have to wait for a newer version user to check.

I wonder what you have been doing that 2000 won't be able to understand?

Is the message a warning or refusal?
 

boblarson

Smeghead
Local time
Yesterday, 21:35
Joined
Jan 12, 2001
Messages
32,059
It was due to the attachment field in Inventory. I removed that and saved it as a 2000 version for you Bill.
 

Attachments

  • SWC DB Test.mdb
    1 MB · Views: 103

Nicolette

Always Learning
Local time
Yesterday, 22:35
Joined
Jun 26, 2010
Messages
178
i have no idea I haven't used anything later than 2007

it is a refusal
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:35
Joined
Jul 15, 2008
Messages
2,271
I have the database now. You have been busy.
I will study over the next few hours and get back to you.:)
 

Users who are viewing this thread

Top Bottom