Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006

    Unanswered: Setting a virtual session

    I am working on a db using Access (2010) that users will keep track of items for fund raisers. When a user enters the system, I would like to use a drop down using info from a table called [Event] that would set the entire session to that specific fundraiser using a field called [Event_ID].

    This would allow entries for a specific fundraiser (several held throughout the year) and leverage some existing entries. The user, once selecting an open event from a dropdown would only see records related to that specific event and any new entries would have that session event ID.

    I have all of my tables normalized but I am a little rusty with Access and how it handles global variables. I am seeking how best to capture and store this global event variable throughout a session. At this point, the user would have to exit the database to change the event. I will add an administrator module later.

    Any general suggestions for structural design and coding would be appreciated.

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    global variables are rarely a good idea
    but you could decalre a public module and have a pubkic varaiable there which stores the event id

    OR probably a better bet request the event id on a form, then hide the form but leave it loaded but probably not visible
    yiou can then retrieve the value from that form using forms!mycontrolname!value
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jan 2006
    I decided to go the hidden form route. Thanks. I am now trying to customize form captions based on information from a field in the hidden form called E_Title. On load of every form, I would like to change the current of each form to [current caption]+[E_Title] so it will display for example: Item-Fall Festival, Attendee-Fall Festival, .... Once the session is finished, the name of the form would revert to its original name "Item". Below is what I have started in a rough conceptual form without any idea of its plausibility.

    Private Sub caption_set()
    Dim Mevent As String
    Dim CaptionVal As String
    Mevent = [Forms]![Event_Set]![E_Title]
    ' The value title of the event filtered for each session contained in the hidden form.
    CaptionVal = Me.Caption
    ' obtain the current value of the caption before modifying
    Me.Caption = CaptionVal + " - " + Mevent
    ' concatenate the old caption with the session event in use and make it the active caption but just for this session.
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts