Solved

cmd button

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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 …
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Viewers will learn the different options available in the Backstage view in Excel 2013.
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now