Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Access

Date Warning MsgBox

 
Jump to:  
 
Bob Vance
PostPosted: Mon Aug 25, 2008 10:40 pm    Post subject: Date Warning MsgBox
       
If text box [tbDatefrom] equals [tbDateto] when i click this Control Button
can I get a warning box
to add to this control
MsgBox "Please make a Start Date Selection!", vbApplicationModal +
vbInformation + vbOKOnly
-----------------------------------
If IsNull(cbHorseName.value) = True Or cbHorseName.value = vbNullString
Then
MsgBox "Please make a Selection!", vbApplicationModal +
vbInformation + vbOKOnly
Exit Sub
End If

Me.Visible = False
DoCmd.OpenReport "rptMonthlyHorseInvoice", acViewPreview
DoCmd.Close acForm, Me.Name
--
Thanks in advance for any help with this......Bob
WindowsXP..MS Access 2007
 

 
pietlinden@hotmail.com
PostPosted: Tue Aug 26, 2008 3:30 am    Post subject: Re: Date Warning MsgBox
       
On Aug 25, 7:40 pm, "Bob Vance" <rjva...@ihug.co.nz> wrote:
Quote:
If text box [tbDatefrom] equals [tbDateto] when i click this Control Button
can I get a warning box
to add to this control
  MsgBox "Please make a Start Date Selection!", vbApplicationModal +
vbInformation + vbOKOnly
-----------------------------------
 If IsNull(cbHorseName.value) = True Or cbHorseName.value = vbNullString
Then
                MsgBox "Please make a Selection!", vbApplicationModal +
vbInformation + vbOKOnly
                Exit Sub
            End If

in the button's Click event,...
if me.[tbDateFrom]=me.[tbDateTo] Then
Msgbox "Please make a Start Date selection!", vbOkonly
+vbInformation
me.[tbDateTo].SetFocus
End if
 

 
Bob Vance
PostPosted: Tue Aug 26, 2008 3:42 am    Post subject: Re: Date Warning MsgBox
       
Thanks Piet I just put an Exit Sub after it and it worked perfect Smile Smile
Regards Bob

<pietlinden@hotmail.com> wrote in message
news:f83b3804-4d9d-4a6e-9052-3e5cf7c757e9@m36g2000hse.googlegroups.com...
On Aug 25, 7:40 pm, "Bob Vance" <rjva...@ihug.co.nz> wrote:
Quote:
If text box [tbDatefrom] equals [tbDateto] when i click this Control
Button
can I get a warning box
to add to this control
MsgBox "Please make a Start Date Selection!", vbApplicationModal +
vbInformation + vbOKOnly
-----------------------------------
If IsNull(cbHorseName.value) = True Or cbHorseName.value = vbNullString
Then
MsgBox "Please make a Selection!", vbApplicationModal +
vbInformation + vbOKOnly
Exit Sub
End If

in the button's Click event,...
if me.[tbDateFrom]=me.[tbDateTo] Then
Msgbox "Please make a Start Date selection!", vbOkonly
+vbInformation
me.[tbDateTo].SetFocus
End if
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

hotel a lisbona baterie umywalkowe grohe Fotka Info drzwi antywłamaniowe