Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

cmd button

Posted on 2009-07-05
3
Medium Priority
?
192 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 43

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 43

Accepted Solution

by:
pcelba earned 750 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 43

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

824 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