WineSnob
Not Bright but TENACIOUS
- Local time
- Yesterday, 22:07
- Joined
- Aug 9, 2010
- Messages
- 211
I am trying to load a form based on an if statement. I think my issue is that I have the DB set to Display form "frmSplash" on open. I have tried the following (frmSplash form load event) but it continues past the frmMenu and stops at the frmSplash. I want to open the DB and look to see if it is registered and if yes then open frmMenu. There is 1 record in tblRegistration so it should open to frmMenu. I checked and it is seeing the 1 record.
Does the display form on open override all?
Any suggestions on how to achieve to goal?
Code:
Private Sub Form_Load()
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("SELECT * FROM [tblRegistration]")
If rs.RecordCount > 0 Then
DoCmd.OpenForm "frmMenu", acNormal, , , , acWindowNormal
Else
DoCmd.OpenForm "frmSplash"
End If
End Sub
Any suggestions on how to achieve to goal?