Results 1 to 4 of 4
  1. #1
    jdet is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    2

    Question Pulling information from the current selection into a query

    Well just to introduce my project I've been working on. My church is opening up a bookstore and was going to use an excel spreadsheet to keep track of the books and music. So I threw together a database in access and though the forms were the best way to emulate a Point of Sale system. I have a functioning POS system but I've hit a brick wall.



    My Main question is, is there any way to pull the current data from a text box into a function? For example In my database I have a purchase button and right now the person has to enter the book ID that is on the screen to actually purchase it. This would be much more user friendly if there was a way for access to know what was on the screen but I'm thinking it might not be possible.

    There are a few other little things, such as if you click cancel or enter a wrong value for the macro it gives you an access error instead of a nicer looking error explaining what's wrong. Or after you select a record in the combobox it highlights the title you selected and I would just like it better if it deselected the record after you clicked it. But that is just cosmetics. I plan on adding records and reorder forums once everything is more concrete.

    Thanks for taking the time to read this and any pointers and/or tweaks would be appreciated.

    EDIT: I attached the zip file to the thread.
    Attached Files Attached Files
    Last edited by jdet; 05-12-2012 at 10:01 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    Did you run Compact & Repair on db first? Still big? Up to 2mb zip file allowed.

    I don't see why code (I use VBA) couldn't do everything you describe. Code can refer to values in controls on forms. If you need to get familiar with programming, review: http://office.microsoft.com/en-us/ac...010341717.aspx

    I can't download your project from here, will try later.
    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.

  3. #3
    jdet is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    2
    I guess that's the issue, I'm not sure how to do that with programming lanugage inside access. I have minimal experience in C++ and Java but I've never used VBA. I've looked for example code and couldn't find anything.

    I attached the zipped file and I will edit the main post add the file.

    Thanks for taking the time to look this over!
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    The easier approach to saving the purchase info is a form bound to an ItemsSold table and user selects the item to purchase from a combobox list. Your data structure does not save individual sales records. You are adjusting the quantity number of the item. This is poor relational db design. There is no documentation, no 'trail'. If an error occurs in updating the quantity there is no way to determine the correct value. Saving aggregate data is usually a very bad idea. In a properly structured db quantity on hand would be calculated as needed.

    I suggest you explore some template databases offered by Access or elsewhere. There is a selection to choose from when Access is opened. Do a search on the template page for Northwind. It has been used for many years in numerous tutorials.
    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.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Information message on current event
    By justauser in forum Forms
    Replies: 5
    Last Post: 02-07-2012, 12:15 PM
  2. Pulling Excel Cell Information via Dynamic URL
    By brenthardy in forum Programming
    Replies: 1
    Last Post: 01-11-2012, 07:16 PM
  3. Replies: 1
    Last Post: 09-27-2011, 09:42 PM
  4. Replies: 3
    Last Post: 07-31-2010, 07:41 AM
  5. Replies: 0
    Last Post: 05-09-2009, 09:04 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