PC Review


Reply
Thread Tools Rate Thread

calling a procedure/Module

 
 
randria
Guest
Posts: n/a
 
      24th Jan 2009
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.


 
Reply With Quote
 
 
 
 
Stefan Hoffmann
Guest
Posts: n/a
 
      24th Jan 2009
hi,

randria wrote:
> 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 <--

 
Reply With Quote
 
randria
Guest
Posts: n/a
 
      25th Jan 2009
Thank you Stefan, I will take your advice about renaming the controls and I
will try what you suggested.
Many thanks.

"Stefan Hoffmann" wrote:

> hi,
>
> randria wrote:
> > 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 <--
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem calling Error Handler in Standard Module from Form Module =?Utf-8?B?Sm9obiBE?= Microsoft Access Form Coding 2 19th Apr 2007 02:26 AM
How to jump from a Form procedure to a Workbook or Module procedure? T. Erkson Microsoft Excel Programming 4 25th Jan 2007 07:15 PM
Calling an embedded items event procedure from within a normal module jase Microsoft Excel Programming 3 13th Jun 2005 01:56 PM
Calling Procedure From A Module Tony C Microsoft Access VBA Modules 1 22nd Jul 2004 01:54 PM
Calling procedure from UserForm Code Module rob nobel Microsoft Excel Misc 4 2nd Feb 2004 09:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:22 PM.