Message Box or Option Group

007stuart

Registered User.
Local time
Today, 21:37
Joined
Mar 20, 2009
Messages
23
Hi all

I am considering placing either an Option Group or a Message Box on a form that becomes visible after a "Close" command fires.
There would be three options :

1 Yes I am done
2 Organise a Repair
3 Record a Payment

Is this the right way to go about this and if so can you give me an idea of what code and wher goes should I use
Many thanks
Stuart
 
You're not clear about what you want 007stuart. Could you explain? What do you mean by "after a close command fires"?
 
Apologies for the confusion

Let me restate my objective.

I have a form, that once complete, allows the user to to either instruct a repair or record a an arrangemnt to repay arrears.


Initially I had thought of a message box but now think that an Option Group with 3 options (Instruct Repair, Record Arrangement & Close) would be better.

I have tried the follwing code

Private Sub CmdOK_Click()
If Me.OptGrpWhatNext.Value = 1 Then
DoCmd.Close
If Me.OptGrpWhatNext.Value = 2 Then
DoCmd.OpenForm "FrmRepairs"
If Me.OptGrpWhatNext = 3 Then
DoCmd.OpenForm "frmAccounts"
End If



End Sub

However I end up with a Compile Error "Block If without End If"

Your guidance as always is very much appreciated
 
You're on the right path Stuart however, for every IF there must be a closing END IF. What you need in your code is actually a IF... ELSEIF... END IF statement. This is the structure:

Code:
IF [Option1] = True Then
    .... Do Something
ELSEIF [Option2] = True Then
    .... Do Another Thing
ELSE
    .... Do Something Else
END IF

I hope that helps.
 

Users who are viewing this thread

Back
Top Bottom