Solved

cmd button

Posted on 2009-07-05
3
180 Views
Last Modified: 2013-11-24
My Previous Question refers-I have Acess 2003 -Can you explain in more detail the macro  control  parameter ? How to do step by step?
0
Comment
Question by:WIETIE
  • 3
3 Comments
 
LVL 41

Expert Comment

by:pcelba
ID: 24783730
Having no Access 2003 just now but it may change soon... How big is your database? If it is not so large and if it does not contain some secrets then you may post it here as file attachement and I'll do the change on your form in Access 2007 (it should work in 2003 vers).
0
 
LVL 41

Accepted Solution

by:
pcelba earned 250 total points
ID: 24785208
1) Open your form in Design mode and add a Command Button to it using the Command Button wizard (click the Control Wizard buton in Form toolbox and the Wizard will appear after adding the button to the form).

2) Select Record Operations category and Add New record action on the first wizard screen and button appearance on the second wizard screen, and button name on the third screen. Click Finish

3) Look at On Click event procedure for your new button and add the following line:

    DoCmd.GoToControl ("HKNR")

just after the line containing DoCmd.GoToRecord

The whole Click event is included:

Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
 
 
    DoCmd.GoToRecord , , acNewRec
    DoCmd.GoToControl ("HKNR")
 
Exit_Command6_Click:
    Exit Sub
 
Err_Command6_Click:
    MsgBox Err.Description
    Resume Exit_Command6_Click
    
End Sub

Open in new window

0
 
LVL 41

Expert Comment

by:pcelba
ID: 24785270
The original question is here (for possible future reference): http://www.experts-exchange.com/Microsoft/Applications/dBase/Q_24545042.html
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question