calling a procedure/Module

R

randria

Hi, I am a learner and this forum has helped me started. I am using the
calendar form of Allen Browne and I want to include it in my codes but I
really dont know how to go about it. here are my codes;

Private Sub Date_DblClick(Cancel As Integer)
Dim prcd As Date
Dim CalendarFor As AcFormOpenDataMode ' should this be declared as a module ?
If Not IsNull(Me.Date) Then
prcd = Me.Date
DoCmd.GoToRecord , , acNewRec
Me.Date = prcd
Else
If IsNull(Me.Date) Then
DoCmd.OpenForm "CalendarFor", acNormal ' I dont know how to call a module
End If
End If
Exit_Date_DblClick:
Exit Sub
Err_Date_DblClick:
MsgBox Err.Description
Resume Exit_Date_DblClick
End Sub

Help!
Many thanks.
 
S

Stefan Hoffmann

hi,
Hi, I am a learner and this forum has helped me started. I am using the
calendar form of Allen Browne and I want to include it in my codes but I
really dont know how to go about it. here are my codes;
Basically you need not code:

http://allenbrowne.com/ser-51.html

Otherwise try this:

Private Sub Date_DblClick(Cancel As Integer)

CalendarFor [Date], "Select the sale date"

End Sub

btw, you should really rename your field and/or control, because [Date]
is a reserved word and also a function in VBA.


mfG
--> stefan <--
 
R

randria

Thank you Stefan, I will take your advice about renaming the controls and I
will try what you suggested.
Many thanks.

Stefan Hoffmann said:
hi,
Hi, I am a learner and this forum has helped me started. I am using the
calendar form of Allen Browne and I want to include it in my codes but I
really dont know how to go about it. here are my codes;
Basically you need not code:

http://allenbrowne.com/ser-51.html

Otherwise try this:

Private Sub Date_DblClick(Cancel As Integer)

CalendarFor [Date], "Select the sale date"

End Sub

btw, you should really rename your field and/or control, because [Date]
is a reserved word and also a function in VBA.


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top