Results 1 to 9 of 9
  1. #1
    roglejr94 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Posts
    4

    Smile Updating a table from a form

    I have a table (TableA) that I update certain records via it manually from a form (FormB).

    Open FormA and enter a ticket# and click FIND.


    FormB opens with certain fields preloaded from TableA. (All the fields on FormB come from TableA and the ones that are BLANK are suppose to be that way at this time.)
    What I want to do is default current date into TableA.DateEnteredPaid and current user into TableA.EnteredPaidBy and "PAID" into TableA.Disposition and then update them when I save the record/exit FormB.

    How would I do it? (Access newbie here)

    Thanks in Advance!
    T-Rex

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Will require code (macro or VBA) - I use only VBA.

    This is adding data to an existing record or default values for 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.

  3. #3
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    select the table in the navigation pane (left side bar) and click create form. Will make the form with the table as the record source so it is tied to your table. Will automatically generate textboxes and labels for every field in your table. You can delete which ones you do not want, and switch some to combo boxes or list boxes if you want.

  4. #4
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    The FIND function you want will be a query that will have the Criteria as [Enter Ticket #], the user will be prompted to enter the number and it will return information on that record.

  5. #5
    roglejr94 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Posts
    4
    I have the table already created and using it but I want a couple fields to default current date and user into the table.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Does not answer my question.

    Set the DefaultValue property for the DateEnteredPaid to Now() or Date() and that field will be automatically populated for a new record.

    Setting default for EnteredPaidBy will require code.

    Setting value for either in an existing record will require code.
    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.

  7. #7
    roglejr94 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Posts
    4
    Both exist in the TableA so I need to code for them but I have no idea on that. I prefer RPG on the iSeries than Access. LOL

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What is 'RPG on the iSeries'?

    Still have not directly answered my question from post 2.

    How do you know who 'current user' is? Do you have a login procedure? Or do you want to pull username from network login?
    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. #9
    roglejr94 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Posts
    4
    RPG on the iSeries: If I have to explain then it's a mute point.

    As my initial post that started this thread says: UPDATE records

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

Similar Threads

  1. Replies: 12
    Last Post: 11-11-2014, 02:10 PM
  2. Updating main table from temp table AND form value
    By shabbaranks in forum Programming
    Replies: 8
    Last Post: 05-01-2013, 07:18 AM
  3. Form not Updating Table
    By j2curtis64 in forum Forms
    Replies: 1
    Last Post: 05-11-2011, 05:17 PM
  4. updating a table from a form.....
    By softspoken in forum Access
    Replies: 7
    Last Post: 04-21-2010, 09:04 AM
  5. Updating a table from a form
    By Lynn in forum Forms
    Replies: 3
    Last Post: 03-18-2010, 10:51 AM

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