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

    need help with prefilled form


    hi guys, i tried to search for this but i found none. currently, i use access to create the database for my apartment. I have created 2 tables the first one is for the detail of the room which includes the room ID and the detail of the room. Another one is the invoice table which include the room id (related with the room id in the first table) and invoice detail like electricity water and also the date for each month. However in the form i create to add a new record for invoice table. I need to fill the room id and invoice detail and month for every room and every month. So in conclusion i need to fill the room id for every room every month which i think it is not neccesary since i know that the room id wont change and i need to fill in the same every month. Is there a way to just create the form with the pre filled form of the room id for all of my room and then i just fill in the invoice detail to add a new recode to my invoice table? thank for any suggestion

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Why would each room of an apartment have its own electric or water invoice?

    Perhaps you need a form/subform arrangement. Main form bound to rooms table, subform bound to invoice table. Navigate to room, enter invoice amount and month info and the room ID will automatically save to invoice record.

    Otherwise, 'prefilling' a form will require VBA code to create records in the invoice table and open form to that set of records. Or an unbound form with 'rows' of textboxes for the rooms and VBA code to save entered data into records of table.
    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
    rivereridanus is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    71
    If you have the textbox for your room ID, then you can just go into the properties window and under the Data tab, enter your room ID into the Default Value property. This will only be useful if you are absolutely sure that yours is the only room that will have to be entered. Then you can either choose to hide the textbox so that the user doesn't have to do anything with it, or you can leave it visible and the user will just ignore it since it has been pre-filled.

  4. #4
    Exotic is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    2
    thank you very much guys i will try doing it

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

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