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

    Please help! One table, one form, one macro

    Hello all,



    I need a simple access database (ONE TABLE, ONE FORM, ONE MACRO). Actually, I am assuming I need an access database because I am pretty sure Excel is not capable of doing what I would like. I work in procurement and receive over 100 purchase requisitions (PR) a week some with 10+ line items each. Keeping track of which PR are still open is nearly impossible on paper. Dont ask about our procurement system because its older than me and not capable of anything.

    Heres what I would like to have:

    First, a very simple table with three fields.

    PR Number Line Number Order Number
    201206698 1
    201206698 2
    201206698 3
    201206698 4

    PR Number and Line number combined are the primary key. Order number is not required. This I can do. Here is where I am clueless.

    I need a form (i think I need a form)

    This form looks identical to the table with the exception that is displays each PR as a block so to say.

    PR Number Line Number Order Number




    201206698 01
    02
    03
    04
    201206699 01


    Now, I only want to see "open" lines for each PR. I.E. only records whos "order number" field is blank.

    Last, i think this would be a Macro. No idea really.

    When i receive a new PR and have to enter it into the database. I dont want to sit there and type the same PR over and Over for each line item. I just want a "add new" button on my form that asks to enter the PR number then the number of lines on it. Then Access would automatically create the records.

    Enter PR number: 2012007000
    Enter # of lines: 7

    this would automatically go and create all 7 records in my table.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Build a query to filter for blank order number:
    SELECT * FROM table WHERE [Order Number] Is Null;

    As for the repetitious data entry, either split the table into two related parent/child tables and build form/subform arrangement or use VBA code to run INSERT sql action to create multiple records. Or use VBA code to set PR Number when moving to new record. You might find the form/subform option easiest.

    Review

    http://forums.aspfree.com/microsoft-...es-208217.html
    http://office.microsoft.com/en-us/ac...010098674.aspx
    http://www.access-programmers.co.uk/...ad.php?t=99232
    http://allenbrowne.com/ser-24.html
    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. Login Security w/ Macro Builder and Table
    By benthamq in forum Programming
    Replies: 14
    Last Post: 01-28-2013, 03:51 PM
  2. Emailing the available attahcment in table using macro.
    By Muralidaran in forum Sample Databases
    Replies: 3
    Last Post: 03-22-2012, 07:54 PM
  3. Replies: 11
    Last Post: 11-07-2011, 11:29 AM
  4. Replies: 2
    Last Post: 11-02-2011, 08:31 AM
  5. Replies: 2
    Last Post: 06-06-2011, 04:18 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