Results 1 to 15 of 15
  1. #1
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16

    Move from form to form with same record

    Have a db with 10 forms. Regardless of which form is opened..a user will search for a record to modify. If they move to another form I need to keep that record id alive so the next form is automatically on that record. Thoughts?


    I was going to do a little macro that would fire on each form open and check a VBA snippet for a record id. If not null, load said record, else load first record.

  2. #2
    JenEveAle is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    15
    Are they opening the forms in the same order each time? For example, are they moving from FormA to FormB sequentially every time? Or might they be opening the forms in random order?

  3. #3
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16

    random

    Can be random. I would have had a main form with button to go the other forms, but I did not build, came in later.

  4. #4
    JenEveAle is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    15
    If you put buttons on the forms that they will use to open subsequent forms, you can add a filter on the second form that pulls in the ID from the first form. However, they would have to always start with the same form and they would only be able to move between forms via the buttons. This may pose too many limitations on what you're trying to do, though.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    In your first post
    If they move to another form
    -- exactly how does the user do this?

    Is there some logic that controls when/how a user opens a form? Some process steps or something?

  6. #6
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16

    move

    @orange - sorry about that. They have 10 tabs that they can click on to get to any other form. It appears they may be on a master form, so to speak.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    So how would you know which form should be opened with a filter or OpenArgs?
    Can you set up the logic to do that? If so, then you could do the associated programming to make it happen.

  8. #8
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16
    That is the dilemma. I think I will put each tab/form to fire some VBA. Let VBA tie the recordid to the form....or somehting like that.

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What do the users say? Are they complaining?
    I think you need some sort of process map that shows
    for each form, what buttons can be clicked and what should happen.

    You need some sort of plan that is relevant to the situation.
    I'd have the users involved and agreeing on what should happen when and work form that.

  10. #10
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16
    would love to, but...users designed via a helper. Helper emailed to me and said make it do this... LOL

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Good luck.

  12. #12
    BRV is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    29
    Could you use a public DAO.Recordset variable and use the forms .GotFocus property to set the forms recordset property to this variable?

    Then maybe use the .LostFocus to force the forms now current recordset back to the variable so that when you switch forms, it will pass the then current record.

  13. #13
    funi.t is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    52
    hi i have a similar problem.
    I have a Main form with buttons that open 6 other and a few fields for searching data .I would like the buttons to Search for the data that is provided by the user in the Main form and open the forms at the same time.please help

  14. #14
    JenEveAle is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    15
    Are you saying you want ALL 6 forms to open everytime? Or, would various forms open depending on what what selected in the search buttons?

  15. #15
    funi.t is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    52
    hi.i would like the forms to open depending on the data selected on the main form

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

Similar Threads

  1. Replies: 19
    Last Post: 06-05-2012, 08:19 AM
  2. Duplicate field(s) and move to new record
    By cwatson62 in forum Queries
    Replies: 0
    Last Post: 04-05-2011, 10:31 AM
  3. Cant move fields around on a form
    By byterbit in forum Forms
    Replies: 3
    Last Post: 02-20-2011, 06:41 PM
  4. Replies: 1
    Last Post: 08-09-2010, 03:59 PM
  5. move from Main form into sub form
    By miziri in forum Forms
    Replies: 2
    Last Post: 11-28-2009, 06:04 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