[AccessD] Code Help Please

Max Wanadoo max.wanadoo at gmail.com
Thu Mar 6 09:26:21 CST 2008


Hi Patricia,

>>I would make sure the TXT box on the form has a different name than the
CONTROL SOURCE

Why would you want to do that?  I know you can, but there is absolutely no
point that I can see.  I actually make sure that all my bound controls have
the SAME NAME as the datasource so that I actually KNOW what is being
updated when I read my code.  Am I missing something here?

Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of O'Connor,
Patricia (OTDA)
Sent: Thursday, March 06, 2008 2:56 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Code Help Please

I would make sure the TXT box on the form has a different name than the
CONTROL SOURCE So if txtQBInvoice is the CONTROL SOURCE Then change the txt
box to txtQBInvoiceNbr
And change   If Me.txtQBInvoice  Is Null Then  TO  If Me.txtQBInvoiceNBR
Is Null Then

The only other thing I would think of trying is create the txt msg in a
string variable and see if it changes things

Good luck

> On Error GoTo Err_cmdPreviewPackList_Click
> 
>   Dim cancel As Boolean
> 
>   Dim lngRetval As Long
     DIM txtMSG as string
>         
> 
>     If Me.txtQBInvoiceNBR Is Null Then
          txtMSG = "Please Select a Quick Books Invoice Number"  & vbCRLF
          txtMSG = txtMSG &  "Before Running Report."

>       lngRetval = MsgBox(txtMSG, vbOKOnly + vbExclamation +
vbDefaultButton2, "No QB Invoice Number Listed")
> 
> 
>      
> 
**************************************************
* Patricia O'Connor
* Associate Computer Programmer Analyst
* OTDA - BDMA
* (W) mailto:Patricia.O'Connor at otda.state.ny.us
* (w) mailto:aa1160 at nysemail.state.ny.us
**************************************************
 

> 
--------------------------------------------------------
This e-mail, including any attachments, may be confidential, privileged or
otherwise legally protected. It is intended only for the addressee. If you
received this e-mail in error or from someone who was not authorized to send
it to you, do not disseminate, copy or otherwise use this e-mail or its
attachments.  Please notify the sender immediately by reply e-mail and
delete the e-mail from your system. 


-----Original Message-----

> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe Hecht
> Sent: Wednesday, March 05, 2008 10:26 PM
> To: 'Access Developers discussion and problem solving'
> Subject: [AccessD] Code Help Please
> 
> The following code is supposed to make sure there is an invoice number 
> in the text box before previewing report.
> 
>  
> 
> When I run it I get an application error msg box saying object 
> required.
> 
>  
> 
> What have I forgotten now,
> 
>  
> 
> On Error GoTo Err_cmdPreviewPackList_Click
> 
>   Dim cancel As Boolean
> 
>   Dim lngRetval As Long
> 
>    
> 
>     
> 
>           
> 
>     If Me.txtQBInvoice Is Null Then
> 
>       lngRetval = MsgBox( _
> 
>       "Please Select a Quick Books Invoice Number" & vbCrLf & "Before 
> Running Report.", _
> 
>       vbOKOnly + vbExclamation + vbDefaultButton2, _
> 
>       "No QB Invoice Number Listed")
> 
>      
> 
>     
> 
>  
> 
>       Select Case lngRetval
> 
>       Case vbOK
> 
>       cancel = True
> 
>      
> 
>     
> 
>   End Select
> 
>   End If
> 
>   
> 
> TIA
> 
>  
> 
> Joe Hecht
> 
> Joe at anamericanjoe.us
> 
>  
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
>


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list