[AccessD] Code Help Please

Charlotte Foust cfoust at infostatsystems.com
Thu Mar 6 16:36:17 CST 2008


Field names are the one place where I most emphatically do NOT use
naming conventions.  It has always seem unnecessary to me, since it does
nothing for your code, the place that naming conventions come into their
own.

Charlotte Foust

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: Thursday, March 06, 2008 1:22 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Code Help Please

I concur.  I use a 'common sense' name for field names (ie, FirstName,
instead of a prefixed name, such as strFirstName), because I use
variable types for my variables (strFirstName), and control types for my
controls (txtFirstName).

Though I do deviate from that method when it comes to my class objects.
If I create a Person Object, it would have a FirstName property, not a
strFirstName property.

Drew

-----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 12:50 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Code Help Please

I link to databases other than access.  
Years ago I had problems and by making the names slightly different 
	1) allowed better problem solving 
	2) circular references did not popup
	3) if the database names changed it made updates a bit easier 
		 not all the code needed changing

My opinion after 15+ years

**************************************************
* 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 Max Wanadoo
> Sent: Thursday, March 06, 2008 10:26 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Code Help Please
> 
> 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
> 
> --
> 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 The information contained in
this transmission is intended only for the person or entity to which it
is addressed and may contain II-VI Proprietary and/or II-VI Business
Sensitive material. If you are not the intended recipient, please
contact the sender immediately and destroy the material in its entirety,
whether electronic or hard copy. You are notified that any review,
retransmission, copying, disclosure, dissemination, or other use of, or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited.


-- 
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