Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 48
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Solution presented in previous post. Choose the option you are most comfortable with.

    DO NOT allow edit of the Product table Description field when entering/editing invoice record. This is not saving data into Line Items record, it is CHANGING the data in Product table, as you have already experienced.



    You really need to get a better understanding of relational database principles. Perhaps this tutorial site will help http://www.rogersaccesslibrary.com/
    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.

  2. #17
    Leen is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    70
    I certainly understand what you are saying; if this then would be impossible to do, or if there would be no other way around this without changing the Product table, I'll have to extend the list for the Combo Box with, say, 500 items to include every and any possibility to get a right description in this field?

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    If you want to allow users to input any value they want as a description, this requires either a text field in Line Items for that input or allow them to create a new record in Product table and save that record ID in Line Items. Yes, the new record option expands the list of possibilities.
    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. #19
    Leen is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    70
    Just to make sure: I use the combo box for say, "This is the first line", but think this is not enough, I'd like to ADD to the line something like, ", and the second one also".
    Would you give me an example how to do that via a text box in Line Items?

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I suppose you could have a field in Line Items named like DescAdd. Then simply bind a textbox to that field. User can input anything. So I guess you have a third option.
    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. #21
    Leen is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    70
    One last question c.q. request.
    Is it possible to write a piece of code to accomplish this?
    Again, when creating a new invoice have the opportunity to add a bit of text (a rare occasion); once the invoice is saved, never being able to edit it again.
    Your suggestion looks indeed like an option, but I agree, it's an awkward one.
    Looking forward to see once more your expertise...

    Thank you very much for all your time and effort!

    Leen

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Could possibly have the textbox visible only for a new record. But this would work only if the form is in Single View. It is possible to use Conditional Formatting in Continuous or Datasheet view to enable/disable a textboxl. But I don't know if a condition can be based on whether the focus is on a new record.
    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.

  8. #23
    Leen is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    70
    Dear June7,

    Thank you very much for the time you've spent, to make me more knowledgeable in Microsoft Access 2010! It is really very much appreciated.
    Please continue to do your good work; a lot of people are helped by it, I'm sure.

    Thanks,

    Leen

  9. #24
    Leen is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    70
    Hello June7 again,

    The DB is almost ready and I am really getting exited!
    However, there is one thing I can't get my head around: It is about the text boxes (Description) and (Price).

    My question to you is this:

    Is it possible to take the information from the Product Table, but save it in Line Items?
    As I mentioned before, the Description is not often changed, but the Price is...
    Or create a duplicate table of Product? And if yes, how do I do that?

    As it is right now, the invoices seem to change with whatever I put in another invoice.
    When I can "fix" this, I can start using my DB!

    Thanks,

    Leen

  10. #25
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    As described in post 14, same solutions apply to price data.

    The invoices change because you are editing the field from Products table, not field in Line Items table.

    I don't know what you mean by duplicate table of product nor how that would help.
    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.

  11. #26
    Leen is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    70
    You're fast!
    Where I would like to get some understanding is, if I make 2 text boxes in Line Items, how would that provide me with a combo box with all suggestions? It is too much to fill in all data by hand.
    I am obviously not understanding things like you do, so please be patient with my ignorance.

  12. #27
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    You can have a multi-column combobox to list the products and descriptions and prices. Then a textbox for the additional free entry description. Another textbox bound to Price field in Line Items to enter the price. Code in the combobox AfterUpdate event can set value in the Price textbox.

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

    This will allow the price to be edited by user. This is option 2 and does not affect the records in Products table nor will it impact existing records in Line Items. However, when prices do change you will probably want to edit the Products table so the most current price is retrieved and saved into Line Items.

    If you don't want to allow user to change the retrieved price, then be sure to keep Products table up-to-date and use an expression in Price textbox: =[comboboxname].[Column](2)

    I reference 2 in the Column property assuming Price will be in the 3rd column of combobox. Column index begins with 0.
    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.

  13. #28
    Leen is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    70
    Do you mean a combo box taken from the Product table?

  14. #29
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I think so - combobox with Product table records as RowSource.
    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.

  15. #30
    Leen is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    70
    Thank you! I give this a try this week.
    You've made a difference in my life...

Page 2 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 05-07-2013, 08:37 PM
  2. Replies: 12
    Last Post: 01-07-2013, 03:32 PM
  3. HELP>Access 2010 User Login Form Code.
    By zaaimanm in forum Programming
    Replies: 5
    Last Post: 10-22-2012, 07:28 PM
  4. Replies: 0
    Last Post: 07-31-2012, 12:25 PM
  5. code needed to filter form using combo boxes
    By drjim in forum Programming
    Replies: 1
    Last Post: 06-29-2012, 01:50 PM

Tags for this Thread

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