Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code 2 subform's opening

Status
Not open for further replies.

Brogrim

Technical User
Jul 28, 2000
184
IE
I have 2 subform opening on the same form, on the load event of the main form I have included the following

If Forms![frmEntryDup]![sbfrmMemDup].Form![MemberID] = Forms![frmEntryDup]![sbfrmBHDup].Form![MemberID] Then

'MsgBox "The PRIMARY key is identivcal in both forms. This form will close. Move to the next record"
MsgBox "There are 2 entries from the Mobility Center, the person may a member of the association"

Then I run some sql. this works fine

My problem is I want to add in another ElseIf statement to read if there is no value in Forms![frmEntryDup]![sbfrmBHDup].Form![MemberID] I can give the user a diffrent message and run a different sql statement

I have tried

ElseIf Forms![frmEntryDup]![sbfrmBHDup].Form![MemberID] < 1

Thanks for the help

 
How about

ElseIf IsNull(Forms![frmEntryDup]![sbfrmBHDup].Form![MemberID])

Haven't tried it but it might work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top