I am prompting a user to confirm an action. By default, the actions should be No. (It is a check to add records if records already exists...we don't really want to do it most of the time)
I have Option Strict on for my applications, so this code does not work. I can't figure out how to CType it or do what needs to be done to give me a messagebox with a Yes and No button and make the No button the defaulted button. Anyone help??? Thanks.
=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
I have Option Strict on for my applications, so this code does not work. I can't figure out how to CType it or do what needs to be done to give me a messagebox with a Yes and No button and make the No button the defaulted button. Anyone help??? Thanks.
Code:
If MsgBox("There are currently surveys created for this time period. Are you sure " _
& "you wish to create more?", MsgBoxStyle.YesNo + MsgBoxStyle.DefaultButton2, "Surveys Exist") = MsgBoxResult.No Then
Exit Sub
End If
=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer