Solved

cmd button

Posted on 2009-07-05
3
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 42

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 42

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 42

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

This collection of functions covers all the normal rounding methods of just about any numeric value.
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

749 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