If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Need help with creating a form (newbie)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-18-12, 10:30
mattmurdock mattmurdock is offline
Registered User
 
Join Date: Jun 2012
Posts: 15
Need help with creating a form (newbie)

Hey guys, I've been trying to make a form but with no luck. I'm pretty new to Access so frogive me for simple errors. I think this should be an easy solution though.

I have three tables- Size, Price, and Upcharge. Simply I need to create a form that lets the user select a size, which automatically fills in the price, and then select an upcharge.
From there, they insert a name, description and PIN # (on the same form), hit a button, and it creates a table that has all the info in a row, with a column for total price (price + upcharge).

I've attached the tables and a few things I've been messing around with. Can anyone give me some direction?
Attached Files
File Type: zip Database22.zip (29.9 KB, 0 views)
Reply With Quote
  #2 (permalink)  
Old 06-18-12, 12:40
Mike02 Mike02 is offline
Registered User
 
Join Date: Jun 2012
Posts: 78
create a query to have the expression for the price. IE the price gets created automatically. which then is filled into the table. let me know how that works just an idea

Cheers,
Mike
___________
Reply With Quote
  #3 (permalink)  
Old 06-18-12, 13:19
mattmurdock mattmurdock is offline
Registered User
 
Join Date: Jun 2012
Posts: 15
I created a query that gave me the sizes and the prices. When I drag that into my form it just puts it into a chart in my form. How do I make those into selectable drop downs? Thanks!
Reply With Quote
  #4 (permalink)  
Old 06-18-12, 15:00
sps sps is offline
Registered User
 
Join Date: Aug 2004
Location: Cary, NC
Posts: 264
This is the basic concept assuming there is a logical connection between Size, Price, and Upcharge in your database.

Use the Size Table as the source of the first combo.
For Price use a saved query that finds Price based on the value of the Size combo
Do the same for Upcharge using the value of the Price combo

On the after update event of Size, have it requery the Price combo. Do the same on price to requery Upcharge.

For now, you can do these with queries built into the database, but the solution is a lot cleaner once you learn how to set dynamic result sets.
__________________

Steve
Reply With Quote
  #5 (permalink)  
Old 06-19-12, 09:12
mattmurdock mattmurdock is offline
Registered User
 
Join Date: Jun 2012
Posts: 15
Quote:
Originally Posted by sps View Post
This is the basic concept assuming there is a logical connection between Size, Price, and Upcharge in your database.

Use the Size Table as the source of the first combo.
For Price use a saved query that finds Price based on the value of the Size combo
Do the same for Upcharge using the value of the Price combo

On the after update event of Size, have it requery the Price combo. Do the same on price to requery Upcharge.

For now, you can do these with queries built into the database, but the solution is a lot cleaner once you learn how to set dynamic result sets.

I was wondering if you could give me a little more help on how to have the after update event requery the price combo. Any help would be greatly appreciated!
Reply With Quote
  #6 (permalink)  
Old 06-19-12, 13:56
sps sps is offline
Registered User
 
Join Date: Aug 2004
Location: Cary, NC
Posts: 264
Create a query that will become the source for your Pricing combo and set the Row Source of the pricing combo to this query (and Row Source Type to Table/Query)

Then, assuming that your pricing combo is called cboPricing and your size combo is called cboSize, simply add this in the code window

Code:
Private Sub cboSize_AfterUpdate()
    cboPricing.requery
End Sub
Then just repeat this process for the upcharge combo
__________________

Steve
Reply With Quote
  #7 (permalink)  
Old 06-19-12, 18:20
mattmurdock mattmurdock is offline
Registered User
 
Join Date: Jun 2012
Posts: 15
Hi Steve- thanks for the message. I tried putting in the code as you described but it never worked. I was hoping you could describe how to do it with my dB attached. Any help or directions would be greatly appreciated- Thank you!
Attached Files
File Type: zip NewAwesomeDB.zip (87.2 KB, 1 views)
Reply With Quote
Reply

Tags
access, forms, queries, relationship

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On