Okay, should be simple I think. I know I'm just missing something simple.
I have a form, "events" with a subform "event standings". For regular events, all of the columns are working fine and the form does what it is supposed to do. However, in an effort to cut down making more forms for pretty much the same thing, I want to have my user select the type of event, then turn columns on / off based on the type of event.
Here is what I've done so far.
Code:
Private Sub EventStandings_Enter()
'When user begins working in the subform
'Check to see if event is Sit N' Go Event
'Declare the Variable
Dim VarET As Variant
'Lookup the type of event selected from the event's table.
VarET = DLookup("event_type", "events", "event_id =" & event_id)
'If event selected is a Sit N Go
If VarET = "Sit n' Go" Then
'Launch warning message.
Dim ButtonClicked 'Declare button variable
ButtonClicked = MsgBox("Did you want this to be a Sit N' Go Event?", vbYesNo)
If ButtonClicked = vbNo Then event_type.Undo 'If selected no, undo the event type and reselect.
MsgBox ("Select the appropriate event type")
Else
' 'Hide columns not needed for this type of event
' Form_EventStandings.finish_points.Visible = False
'
' 'Check to see if member has enough points
' 'do a Dsum here to get the player's running total and see if they have enough points to join event.
' End If
'
End Sub
I'm having two issues here.
1. When the message box opens; no matter which choice I make, it gives me the "select appropriate event" msgbox.
2. Can't for the life of me get it to hide columns and unhide ones that I would want.
3. I have a few IF statements that I will need to process here. Should I be enclosing them or something
For reference, I want to hide a column called, "finish_points" which is in the subform, EventStandings