Should I change this code?

Should I change 556 to 560???..............Thanks for your help..........Bob

Private Sub Command560_Click()
On Error GoTo Err_Command556_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmClientInfomation"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command556_Click:
    Exit Sub

Err_Command556_Click:
    MsgBox Err.Description
    Resume Exit_Command556_Click
End Sub 


0
Bob
7/15/2007 4:37:26 AM
access 16762 articles. 3 followers. Follow

3 Replies
2436 Views

Similar Articles

[PageSpeed] 42

On Sun, 15 Jul 2007 16:37:26 +1200, "Bob V" <rjvance@ihug.co.nz> wrote:

>
>Should I change 556 to 560???..............Thanks for your help..........Bob
>
>Private Sub Command560_Click()
>On Error GoTo Err_Command556_Click
>
>    Dim stDocName As String
>    Dim stLinkCriteria As String
>
>    stDocName = "frmClientInfomation"
>    DoCmd.OpenForm stDocName, , , stLinkCriteria
>
>Exit_Command556_Click:
>    Exit Sub
>
>Err_Command556_Click:
>    MsgBox Err.Description
>    Resume Exit_Command556_Click
>End Sub 
>

No. You should instead change the name of the button Command560 to
cmdSomethingMeaningfulToYou. The GoTo lines and their corresponding labels can
be anything, but need to match. It's perfectly plausible to use

On Error GoTo Proc_Error
....
Proc_Exit: 
  Exit Sub
Proc_Error:
  <error handling code here>
  Resume Proc_Exit
End Sub

But using the default Commandxxx names gives you NO clue six months from now
what this command button is intended to do. Using a name like
cmdOpenClientInfo makes it much clearer what the button is meant to do.

             John W. Vinson [MVP]
0
John
7/15/2007 5:08:49 AM
Thanks John I will change there names, that wont impact of my db 
programme?.....Bob

"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
news:bpaj9392o75s7nqlm40tav0gf072rjhcbb@4ax.com...
> On Sun, 15 Jul 2007 16:37:26 +1200, "Bob V" <rjvance@ihug.co.nz> wrote:
>
>>
>>Should I change 556 to 560???..............Thanks for your 
>>help..........Bob
>>
>>Private Sub Command560_Click()
>>On Error GoTo Err_Command556_Click
>>
>>    Dim stDocName As String
>>    Dim stLinkCriteria As String
>>
>>    stDocName = "frmClientInfomation"
>>    DoCmd.OpenForm stDocName, , , stLinkCriteria
>>
>>Exit_Command556_Click:
>>    Exit Sub
>>
>>Err_Command556_Click:
>>    MsgBox Err.Description
>>    Resume Exit_Command556_Click
>>End Sub
>>
>
> No. You should instead change the name of the button Command560 to
> cmdSomethingMeaningfulToYou. The GoTo lines and their corresponding labels 
> can
> be anything, but need to match. It's perfectly plausible to use
>
> On Error GoTo Proc_Error
> ...
> Proc_Exit:
>  Exit Sub
> Proc_Error:
>  <error handling code here>
>  Resume Proc_Exit
> End Sub
>
> But using the default Commandxxx names gives you NO clue six months from 
> now
> what this command button is intended to do. Using a name like
> cmdOpenClientInfo makes it much clearer what the button is meant to do.
>
>             John W. Vinson [MVP] 


0
Bob
7/15/2007 9:16:07 PM
On Mon, 16 Jul 2007 09:16:07 +1200, "Bob V" <rjvance@ihug.co.nz> wrote:

>Thanks John I will change there names, that wont impact of my db 
>programme?.....Bob

Be sure that "Name Autocorrect" is turned *OFF* (it has been nicknamed Name
Autocorrupt for good reason), and use the binoculars in the VBA editor to find
and change any references to the code or the control name and fix them, and
you should be fine.

Wouldn't hurt to Compact the database when you're done, though.

             John W. Vinson [MVP]
0
John
7/15/2007 11:37:49 PM
Reply:

Similar Artilces:

file format needs to be changed
I have an excel file which comprises of a template for Identity card with a jpg file embedded in it. I would like to save this file in a jpeg format so as to get a photo printout of the same. How is this possible? If you scan the document, that would put the file into an image format. Then you could convert the file to whatever image file format you wanted. Just a thought... Highlight the area you want printed then hold SHIFT key and select Edit>Copy Picture. Open your favorite graphics editor or MS Paint and paste to there. Save as *.jpg Gord Dibben Excel MVP On Tue, 14 Jun 200...

Form event not firing on change
I am using a pop-up calendar form that is called from my main form. GotFocus and MouseDown events on the main form are calling the popup calendar. Once a day has been selected the last thing that happens is the originating control (the date field on my main form) is being set to the value of the date selected. This method does not fire the Change, BeforeUpdate, nor AfterUpdate events. I have looked at RaiseEvent, but the statement that is setting the value of the originating control is in calendar form module not the main form module. I also tried putting the onupdate code in a...

IE7 changes image MIME type
Trying to upload a PNG or JPG image to a website fails. IE7 has changed the MIME types from image/jpeg to image/pjpeg and image/png to image/x-png, neither of which is accepted by the site. (a) Why does IE do this? (b) Can I stop it from doing this? I read at http://msdn.microsoft.com/en-us/library/ms775147(VS.85).aspx When uploading files from the client to the Web server, Windows Internet Explorer uses FindMimeFromData to determine a MIME type. Where possible, FindMimeFromData returns hard-coded values from the list of Known MIME Types rather than relying on the MIME typ...

close form code
what code can i use to close a form? I have a macro that opens a form. when i enter data into the form then hit enter, code runs. when the code finishes running, i want the form to close. i assume i would put this as the last line of the code after i hit enter. but what would the code be? -- tkaplan ------------------------------------------------------------------------ tkaplan's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=22987 View this thread: http://www.excelforum.com/showthread.php?threadid=376383 You have a reply to your other post that, by chance,...

Change search for products
Is there a way to customize CRM so that when you search for products it searches by product id and not name? I'm referring to the "Find Products" function on the product screen. My client knows the id better than the name. Thanks! The Find Products function is not customizable. Unfortunately you cannot change it. Kind regards, Ronald Lemmen Avanade Netherlands "John" wrote: > Is there a way to customize CRM so that when you search for products it > searches by product id and not name? > > I'm referring to the "Find Products" funct...

Trouble with my NotOnList code
The code below works but it involves me having to type the new "OnNotinList" entry twice - first in the combo box on the main form, then on the data entry form that pops up when I say yes to adding a new entry. Private Sub fldComplaintMedium_NotInList(NewData As String, Response As Integer) ' Add a new entry by typing a name in the box. Dim intNewEntry As Integer, strTitle As String, intMsgDialog As Integer ' Display message box asking if user wants to add a new Sculpture. strTitle = "Entry Not In List" intMsgDialog = vbYesNo + vbQuestion + vbDef...

how can i apply conditional formatting by code ?
Say that there is a table T_PERSONAL [Name (text), Surname (text), Salary (integer)]. I created a Tabular Form (F_PERSONAL) which retrieves information from T_PERSONAL. I want to put a image for a specific record on the form, if the record satisfy some specific criteria. For other record which does not satisfy the criteria, image should be invisible. Say that, if [Name (text)] ~text13~ is "ALBERT", Image Object ~Image13~ should be visible. I dont suppose that Image Object should be included in T_PERSONAL. It will be inserted manualy during design stage of Tabular Form. I would not as...

When I add a row to excel how can I stop formulae changing
I've done this before, but can't remember how. I want to add a row at the top of a sheet, but without formulae with a range eg =sum(a1:a5) changing to =sum(a2:a6). $ isn't the answer =SUM(INDIRECT("A1:A5")) HTH Kostis Vezerides "vezerid" wrote: > =SUM(INDIRECT("A1:A5")) > > HTH > Kostis Vezerides > Thanks for that. How about if I after inserting a row A1:A5 changes to A1:A6 TIA Dave ...

Code Page problem in SetWindowText
This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C7EFB3.937325D0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi All, I've created a MFC project in MBCS. I need to show some set special = characters ( ASCII code > 128) in a CStatic controls. It shows correctly = in all English locale window. However all those special character = becames "?" in non-English window. How to solve this problem? Here's = part of my source code void MySprcialCharacterDlg::OnUpdate() { TCHAR stringToShow[10]; Ze...

changing the location of the x axis labels
Hello, I'm trying to make column graphs by using excel 2002. The problem is, my y axis values have some negative numbers, so the x axis labels overlap with some of the columns. Is there anyway to relocate the x axis labels while keeping the category x axis crossing at zero? Thanks! Double click on the axis. On the Patterns tab, for Tick Labels, choose the Low option. The axis will remain at zero, but the labels will move to the bottom of the chart. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com ___...

change default site
Good morning, is it possible to change the program web site from the default site on 80 port to another port keeping the refer to the database? ...

Simple OnLoad Code is Giving an Error
I have the following code in my OnLoad event of the Case form. I basically want to disable the description field if there is data in it so it cannot be changed. If (crmForm.all.description.DataValue != null) { crmForm.all.description.Disabled = true; } I am getting an error on form load that says: "There was an error with this field's customized event. Field:window; Event:onload; Error:Object expected." Any ideas on how to resolve? Thanks. On 26.08.2009 19:24, LYFZGUD wrote: > I have the following code in my OnLoad event of the Case form. I > basically want to di...

VBA to create series of workbooks need to add code to skip creating a report if no lines meet criteria
Hi All, I need some assistance as where I'm at with this report is far beyond my level of knowledge and I'm hoping that someone can point me in the right direction. I've created a template that creates a report and displays variances based on the "search criteria" which is defined in another worksheet and hides any rows that are equal to Zero and are between the value (>= -5000 AND <= +5000) and what I'm trying to figure out is if there are no rows visible within the report then it should not save the report (that way I don't email a blank works...

Code not working
I need to capture the Last Row number as soon as the WB opens; And as the sheet2 Column A cells are filled-in have the variable Lrow furnish an up-to-date value, representing the last non-blank row in Col A of Sheet2. The below is not working; Can yo suggest a better way? TIA, Dim Lrow As Long Private Sub Workbook_Open() Lrow = Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Row End Sub Press Alt + F11 to open the VB editor. In the Projects pane at the upper left side of the screen, double click on ThisWorkbook and paste the code into the code wind...

How to change Cluster Server Exchange Drive Letter
I am wondering on the correct procedure for changing the drives for Exchange 2003 in a clustered environment. The Exchange 2003 Clustered resource was created with a 'data path' = m:\exchsrvr This resulted in all of the databases, SMTP, MTA, Search folders being created within this folder. I can change the database directories using ESM, SMTP directories using ESM x.400 (MTA) directory using ESM I can change the MTA Run Directory by editing the registry when the server is active and manually changing the path I have not been able to change the Search directory (either by editin...

SQL to mak all items TAX and CODE 128A
Hi, I have seen this before, but cannot find it now. I need a query to make all items Code 128A and also need to set all items as TAX (taxable). Thanks for your help. geokar, http://tinyurl.com/sy9lm SO Manager | Wizards | Task 170 Assign Sales Tax Must have access to CustomerSource -- * Get Secure! - www.microsoft.com/security You must be using Outlook Express or some other type of newsgroup reader to see and download the file attachment. If you are not using a reader, follow the link below to setup Outlook Express. Click on "Open with newsreader" under the MS Retail Ma...

Need program to ask me to save changes when closing
Hi My wife has excel 2003 and she at times closes the program and the file she is working on will close without saving the changes. My machine always asks me if I want to save the changes made. I can not find out how to enable this, please help. My auto save is also not working any ideas. Thank you. Some functions are volatile, if you are using a workbook with any volatile function in it regardless if you do anything it will ask you if you want to save the changes or are you saying that if you open up a new workbook, then close it again it will ask you to save it? -- Regards, Peo ...

Font change
I have a 500 page document with many text blocks that are using different fonts. I would like to changa ALL the fonts to Arial. What is the easiest way to do this. Thanks, Lisette I don't know that there will be an easy way. -- JoAnn Paules MVP Microsoft [Publisher] "Lizzzet" <LizzzetNOCAPS@dc.rr.com> wrote in message news:Ofl17n0qEHA.3760@TK2MSFTNGP09.phx.gbl... >I have a 500 page document with many text blocks that are using different >fonts. I would like to changa ALL the fonts to Arial. What is the easiest >way to do this. > Thanks, > Li...

unwanted font changes
I have a co-worker using Excel 97 SR-2. When she opens up a spreadsheet, the font will change from Arial to any other font available on her system. She has to highlight the worksheet and change the font back. The Style default is set for Arial. Can you tell me how to stop this from happening? Thanks Kelly Kelly, Not sure what is happening here, but one remote possibility might be that excel is having problems handling an excess of styles. If this is just happening with one particular workbook, there's a utility on my site that you could try on the workbook that helps you clean ...

Changing text "A" to a number?
In cell A1 I have the either Letter a, b or c. I would like to give them a numerical value of 1, 2 and 3 in the adjacent cell. Can someone post or point me to the formula? Thanks Try this: =3DCODE(LOWER(A1))-96 Then copy down. Hope this helps. Pete On Apr 11, 5:15=A0pm, Larry <Yak...@gmail.com> wrote: > In cell A1 I have the either Letter a, b or c. > I would like to give them a numerical value of 1, 2 and 3 in the > adjacent cell. > Can someone post or point me to the formula? > Thanks One way: = CODE(UPPER(A1)) - 64 another: =MATCH(A1,{"a","...

Tracking results of changes to database
Is there a good tool for testing results of changes to stored procedure, functions, views etc? Some way to compare results of activity to the results of the same activity after changes are made. Not just for a particular procedure but after you have made changes to multiple procedures that may be used by other procedures. Then run some type of robot function that does the same set of actions that was done on an identical database before the changes were made and then compare the database to see what is different. Thanks, Tom On Mon, 19 Apr 2010 12:31:45 -0700, &q...

Change SQL service logon accounts
Hello I installed CRM 1.2, SQL 2000 on a Windows 2003 server , and provide a new logon account (mscrm) (not the local system) Now I have a problem with KDC error 11 - which I traced back to duplicate serviceprincipalname for that user logon mscrm So I removed the duplicate names. How the SQL agent wont start and Iam getting Kerberos errors when I try to get into CRM How do I change the service accounts for CRM and SQL to use the local system account ? Is there a particular order of changing them Thank you in advance vikrantca ...

changing column headings in Business Portal for GP
How do I change a column heading in Business Portal for Great Plains? Sean E., Thanks for using the newsgroup. What version of BP are you using? Could you provide more detail for what you are trying to accomplish? Thanks Rob Bernhardt Software Quality Assurance Microsoft Business Solutions This posting is provided "AS IS" with no warranties, and confers no rights. "Sean E." wrote: > How do I change a column heading in Business Portal for Great Plains? ...

is there a code that could place a space
I have some data running down column A. I need there to be a space between the companies and their information. ome companies show street address and city and postal code while some only show the telephone number. I guess if there was a way to get the code to put a blank cell above everytime a cell occurs with a telephone number, the goal would b accomplished. Any Ideas???? Thansk for any help you can offer. here is a sample of the data, C A Ferguson & Sons Inc 807-345-2519 181 Clavet Street, Thunder Bay, ON P7A 2M3 C S I 705-267-6488 429 Spruce S, Schumacher, ON P0N 1G0 C S I 705...

changing a field from string to picklist
Hi, is it possible to chnage an input field from a string to a picklist, can this be done through the form customisation section? Thanks in advance Hi Emily, Unfortunately you can not change the data type. As a matter of fact, you can not even delete a field from database once created. What you should do is: - On the form (thru system customization) put the string field on the form(if alread not present), change properties and rename the Name and Lable as 'Do Not Use' on Display Tab and then click 'OK' and remove the field from the form. Advantage of this is you will ...