Hi,
Can someone help? Using an Access form, I'm trying to create a yes/no message box where if the person clicks on "yes" then a form opens and the record source for the form should be "query1". If they click "no" the form should open with record source being "query2". I'm a novice at code and don't know if the form should have a record source in it at all since I want it to change based on "Yes/No".
******
Dim retvalue As Integer
retvalue = MsgBox("Would you like only active accounts displayed?", vbYesNo")
If retvalue = 6 Then
DoCmd.OpenForm "frmNJAcct_addnew", acNormal, "[qryNJAcct_MainInfoOpen]"
Else
DoCmd.OpenForm "frmNJAcct_addnew", acNormal, "[qryNJAcct_MainInfo]"
End If
********
Thanks much.