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
Solved

cmd button

Posted on 2009-07-05
3
182 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 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

This very simple solution applies to a narrow cross-section of the "needs to close" variety. In this case, the full message in Event Viewer was in applog, Event ID 1000: Faulting application iexplore.exe, version 8.0.6001.18702, faulting module …
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 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…
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…

860 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