Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    You want to filter form to selected year then further filter for a record in that year? You want to prevent form navigation to prior years? I don't do this in my db. I have the form RecordSource order records descending by date so the most recent show at top but users can scroll to older records. Maybe someday the dataset will be big enough to cause slow performance on this form and will have to change but don't expect that to happen for a long time. The form has a search utility to allow entering record ID for any year record. This is not a data entry form, it is a search/view only and task execution form.

    Are you using form/subform arrangement? Where is OpenArgs set?

    If you want to provide db for analysis, follow instructions at bottom of my post.



    EDIT: now see your new post. I didn't notice the variable was declared a string, assumed RetYear was number field. I prefer apostrophes, easier for me to read:

    Me.Filter = "RetYear = '" & CurYear & "'"
    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.

  2. #17
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,097
    App not quite the same as I'm understanding your to be. In my app, there are two forms, one continuous where the Roster is shown and the second where the user has double-clicked the selection bar for an individual to view the details for the individual. While in the second form, the user might want to see the details pertaining to another year. In that case, I change the filter based on a drop-down year selection and requery the RecordSource for the form.

    As an aside, the form titles include the currently selected year. Is there a way to suspend the first form at the DoCmd.OpenForm of the second so the first form can reset the caption of the first forms title line? OR, I seem to recall there's a syntax whereby the second form can make that change when one occurs. Something like referencing a control on the first form via the forms collection????

    And yes, when we've exhausted our discussion, I'll mark the thread "solved".

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    If I understand, you want to reset the form's Caption property. Easy to do with VBA.

    If you put the code behind the form whose caption you want changed, simply:
    Me.Caption = "something"

    Instead of literal "something" can be reference to control on form or VBA variable.

    Sorry, I marked this thread solved a lonnng time ago when I thought the issue was solved by the initial suggested code. Just didn't bother to unmark it when we continued.
    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.

  4. #19
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,097
    Just two minutes ago I finally remembered where I'd successfully changed the value in a control from within one form upon another. Not a true Parent/child relationship, just one of those situations where I know the target form is open and safely change one of its controls.

    I think this concludes our conversation about the original post and related issues that evolved. You've been really super with all your help and I appreciate that immeasurably.

    As you say, the thread is already marked "Solved", so we can leave it as such.
    Thanks again,
    Bill

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Switching between multiple databases
    By developer11 in forum Access
    Replies: 2
    Last Post: 11-16-2020, 05:56 AM
  2. Access Switching to frontend and backend
    By caliskier in forum Access
    Replies: 4
    Last Post: 11-19-2012, 11:58 AM
  3. Switching Values in text box????
    By reidn in forum Forms
    Replies: 2
    Last Post: 07-08-2011, 02:04 PM
  4. Table Without PK Switching My Index Orders
    By ajetrumpet in forum Access
    Replies: 5
    Last Post: 09-07-2010, 06:11 PM
  5. switching int/double
    By giladweil in forum Access
    Replies: 2
    Last Post: 07-05-2010, 01:13 AM

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