Zjubias-
Replace:
Me.DDate = Date
With:
Me.sbfDocdetail.Form!DDate = Date
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
__________________________________
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of moi
Sent: Friday, April 26, 2013 3:34 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Auto fill control through button click
Hello all,
Am trying to auto fill my DDate control through a button click.
The code behind the button is below.
Can some correct my code please.. the control i wanted to fill is on the
subform as indicated with the first line of code.
Please bear with me, am trying to learn how to code..
Thank you,
zjubias
Private Sub cmdAddDetail_Click()
On Error GoTo Err_cmdAddDetail_Click
Me.sbfDocdetail.SetFocus
DoCmd.GoToRecord , , acNewRec
Me.DDate = Date
Exit_cmdAddDetail_Click:
Exit Sub
Err_cmdAddDetail_Click:
MsgBox Err.Description
Resume Exit_cmdAddDetail_Click
End Sub
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar