Results 1 to 8 of 8
  1. #1
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91

    Populate multiple fields

    Hi, I know this is well documented but I can't find what I want. I have several records for the same provider, each provider has their own ID, what I am trying to do is populate the same date field just for the same ID. The records are selected (filtered) by combo box and shown as a continous form, a report is run and then emailed which when the email button loses focus the following code is run:
    [Private Sub ProvEmail_LostFocus()
    Me.DateReq1 = Now()End Sub]
    This puts in a date but I need it to be put into all the current records of that ID as the report covers all the records shown in the form. Hope this makes sense.

    Any help would be greatly appreciated.




  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Sounds like you have a design flaw, but you can execute an update query that uses the ID in the criteria.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Thank you, yes, it probably is, this is a bolt on to an existing db which does make things more complicated. I must admit that I am currently looking at a query at present.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    No problem, post back if you get stuck.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Thank you, however I am still stuck I'm afraid.

    Is there any code that could be linked to the email send control that selects every record with the same ID and puts in the current date?

  6. #6
    Geoffk78 is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    6
    Hi,

    I have a similar problem if you could help it would be appreciated.

    I have 2 tables tblCustomer and tblDataInput with 2 associated forms frmSwitchboard and frmDataInput.

    What I am trying to achieve is when I press a combo button (cboCustomer) in frmSwitchboard a dropdown list appears and I select the customer the after update expression opens the form frmDataInput, (all works fine to this point).

    In frmDataInput I have several textboxes that I would like to populate with the customers details; Name, Address1, Address2, Locality etc. I cannot get these textboxes to populate.

    The 2 tables are related tblCustomer field CustomerID (autonumber) and tblDataInput field CustomerID (number).

    Any help would be appreciated.

    GeoffK78

  7. #7
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Geoff, I think you need to run an update query or at least that is what I have done to populate my table and the form. I have a parameter query that runs a report giving all records for one provider, this I have copied and used to produce a new table, the new table is then used to produce an update query which updates the original table for all duplicate Provider ID's records and updates the form. This is all run from the email button when the button has lost focus. It has done the trick, not sure if it is the best way but it works.

  8. #8
    Geoffk78 is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    6
    Thanks for the reply I will give it ago
    GeoffK

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

Similar Threads

  1. Replies: 5
    Last Post: 11-27-2012, 03:56 AM
  2. Replies: 1
    Last Post: 10-28-2012, 07:23 PM
  3. Replies: 8
    Last Post: 08-02-2012, 10:50 AM
  4. Replies: 63
    Last Post: 09-16-2011, 04:55 PM
  5. Replies: 4
    Last Post: 01-20-2011, 10:05 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