Page 5 of 5 FirstFirst 12345
Results 61 to 73 of 73
  1. #61
    ilikeshinythings is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2012
    Posts
    37
    Hmmmm I see what you did but I prefer the way I enabled customers ID on the Order_Form to be looked up in the same box by using the name rather than the ID number. And also The way I wanted the book price to be looked up is the user selects the book that they want in the 'Book_Id' box and then the Book_Price box displays the price of that book without any user interaction. It doesn't seem to be working that way on either database?





    And yeah the main page has alot of buttons that do nothing at the moment but I will be using them to link to open reports when I have all of the data and forms done

  2. #62
    ilikeshinythings is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2012
    Posts
    37
    Ok it's 4am here I've gotta get some sleep so thanks for the help and if i've still not got it figured out by tomorrow i'll be back haha

    cheers guys

  3. #63
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    shiny, I think something is backwards. When I click New Order, it opens customer info form. This assumes every customer is new and must be entered before order? Then I click Add Customer and the Order form opens. This form has the combox to select customer. Suggest open the Order form instead when New Order clicked. Then if customer not in the combobox list handle new customer with the NotInList event.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #64
    ilikeshinythings is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2012
    Posts
    37
    Yeah I'm not sure how I didn't think of that before to be honest lol thanks! but i'm still stuck with how to do the whole Book_Price looking up the price of the book using the ID from Book_ID :/

    I spent a few hours today trying to code it using SQL but no luck

  5. #65
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Will need code to save the book price. I use only VBA. One way is to have the price as a column in the BookID/Name combobox. Then code in combobox AfterUpdate event can save the price to the Price field.

    Me!Price = Me.comboboxname.Column(2)

    Combobox column index starts with 0 so I am guessing the price would be in the 3rd column which would be index 2.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #66
    ilikeshinythings is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2012
    Posts
    37
    Eurgh sorry for not replying but my browser has been HiJacked and I have no idea how to fix it but it doesn't seem to be a problem at the moment so.....


    Ill try that 'Me!Price = Me.comboboxname.Column(2)' code now thanks

  7. #67
    ilikeshinythings is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2012
    Posts
    37
    I tried that but it comes up with 'Cant find the macro 'Me!Book_Price = Me.''

  8. #68
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Form in design view, select [Event Procedure] in the AfterUpdate event property. Double click the ellipses (...), this will take you to the procedure in the VBA editor. Type code there.

    I use only VBA, not macros. Review http://office.microsoft.com/en-us/ac...010341717.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #69
    ilikeshinythings is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2012
    Posts
    37
    Ok so after re-installing windows 7 on my PC I have finally had a chance to try your suggestion and it works!! thanks soo much! Finally haha

    thanks everyone, i'll let you know if i have anymore trouble

  10. #70
    ilikeshinythings is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2012
    Posts
    37
    Sorry to ask yet another question but i'm trying to get a field on the orders form to display the sum of all the books with the same order_id in the order_details table (basically giving total order price) but i;m not sure how to do this :/

  11. #71
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Are you using form/subform arrangement? http://office.microsoft.com/en-us/ac...010098674.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #72
    ilikeshinythings is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2012
    Posts
    37
    Yeah the main form has:
    Order_Date
    Shipping_Date
    Customer_ID

    and the subform has:
    Book_ID
    Book_Price

    But I want the textbox to look up the price of the books using the order_ID of this order and as the user adds books to the order this text box gives a sum of the books in the order

  13. #73
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    If subform is set for datasheet view, open form/subform in form view, click in the subform, click Totals button on toolbar. This will open a row on the subform where can set aggregate calcs (Sum, Avg, Count) under each column. There is no way for the main form to reference this calc.

    If subform is in continuous view, a textbox in subform's Form footer can have expression in ControlSource: = Sum(Book_Price). Main form can reference that textbox by expression: = Forms!mainformname!subform.Form.textboxname.

    I always give the subform container control a name different from the object it holds, like ctrDetails. So the expression would be:
    = Forms!mainformname!ctrDetails.Form.textboxname
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 5 of 5 FirstFirst 12345
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 03-20-2012, 11:09 PM
  2. Weather Database Ideas
    By bigroo in forum Database Design
    Replies: 4
    Last Post: 01-19-2012, 09:43 AM
  3. Ideas for database creation
    By randolphoralph in forum Access
    Replies: 1
    Last Post: 08-31-2011, 02:08 PM
  4. Any ideas?
    By eripsni in forum Access
    Replies: 9
    Last Post: 08-25-2011, 08:33 AM
  5. Piano Shop Database
    By tomself1 in forum Database Design
    Replies: 1
    Last Post: 02-19-2010, 08:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums