Results 1 to 7 of 7
  1. #1
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146

    Set value for a field in a continuous form for every record.

    I have a continuous form that mirrors the data in a table1. It is used to amend table2 once table1 is set just the way I want. I would like to be able to click a button that would clear a short text field for all the 22 records in table1, as well as set a date field for all records in table1 based on a field on another form. Clear as mud?

    Thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Is simple terms,how are table 1 and table 2 related?
    Clear as mud?? We need some more info to understand.
    Can you show some sample records that illustrate what you have and what you would like to have?

  3. #3
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146
    table1 contains FullName, Issue, Date. This table has 22 records in a datasheet form so all 22 records can be modified before appending to table2 which is an Event table for future reference. Table1 is used to simplify inputting data, all 22 at one time, for all 22 personal and there issue for the day, before updating (appending) table2.

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi

    From your description you have People who take part / attend various events.

    Does this describe what you are trying to use Access for?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    Oh, this sound Oh so wrong.
    You do not copy data from one table to another in almost evey situation, just link back to where the data is located.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146
    So I got the result that I wanted by using some VBA with recordset code. Never tried that before. I understand using a table as a reference for another but in my specific case I wanted a place to retain data, as it were, in a que. To be used daily to append the "true" table for work events. I don't know of another way to retain last settings for a small set of records for daily modification. I appreciate the replies.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Table1 should have fields: PersonID, LastName, FirstName, IsActive.

    Table2 should have fields: PersonID_FK, EventDate, Issue.

    Create a 'batch' of records in Table2 like:

    CurrentDb.Execute "INSERT INTO tblIssues(PersonID_FK, EventDate) SELECT PersonID, #" & Me.tbxDate & "# FROM tblPersons WHERE IsActive"

    Then open a form filtered to that date's records for input of Issue.

    DoCmd.OpenForm "frmIssues", , , "EventDate=#" & Me.tbxDate & "#"

    frmIssues can have a RecordSource that includes both tables so the person names can be displayed but don't allow those fields to be edited. Set textboxes as Locked Yes and TabStop No.
    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. Replies: 11
    Last Post: 12-07-2021, 04:27 PM
  2. Replies: 4
    Last Post: 10-30-2020, 05:14 PM
  3. Go to certain record on continuous form
    By LonghronJ in forum Modules
    Replies: 4
    Last Post: 05-07-2018, 12:08 PM
  4. Replies: 8
    Last Post: 02-26-2018, 05:21 AM
  5. Get position of record in continuous form
    By Whizbang in forum Forms
    Replies: 3
    Last Post: 11-02-2011, 01:47 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