Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2007, 09:02 AM
Authorized User
 
Join Date: Apr 2007
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dartcoach,

The 'frmCalendar' is an actual form which contains an "Active X calendar 11.0" control on it.

Rob,

I'll try that too.



 
Old April 23rd, 2007, 09:09 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Grafixx,

Give it a whirl and please ask if you get stuck. It can be strange working with form instances in VBA for the first few times, but once you get your head round it, you can save yourself a lot of time!

HTH.

Regards,
Rob

 
Old April 23rd, 2007, 09:26 AM
Authorized User
 
Join Date: Apr 2007
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

rob,

I cut and pasted your code into the 'Insert Date' command button on the 'frmTask' (Main Form). Then I cut and pasted the code in the 'on click' of the 'frmCalendar'-'Insert Date' command button.

The code on the 'Insert Date' of the 'frmCalendar' returned this error:

'Compile Error: Invalid Attribute in Sub or Function' (Highlighted is the 'Private Sub cmdInsertDate_Click()'

I don't know if I have to change this to specify the which 'date' control on the 'frmTask' I want it to populate?


 
Old April 23rd, 2007, 09:33 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Bryan,
Rob is correct. Utilizing Global Variales can cause problems if you don't pay attention to what you're doing. If you can get his code to work, I highly recommend it.

Kevin

dartcoach
 
Old April 23rd, 2007, 09:35 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Grafixx,

The cmdInserDate_Click() sub should look like this:
Code:
Private Sub cmdInsertDate_Click()
    PopulateWithDate TextBoxName
End Sub
Make sure the PopulateWithDate Sub is pasted into a Global Module.

Did that help?

Rob

 
Old April 23rd, 2007, 09:37 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:Originally posted by dartcoach
 Bryan,
Rob is correct. Utilizing Global Variales can cause problems if you don't pay attention to what you're doing. If you can get his code to work, I highly recommend it.

Kevin

dartcoach
Thanks dartcoach for the recommendation!

Kind Regards,
Rob

 
Old April 24th, 2007, 11:28 AM
Authorized User
 
Join Date: Apr 2007
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks dartcoach for the help with the db isssue. Much much much appreciated.!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Related Issue Kirti.darji Visual Studio 2005 0 May 13th, 2008 06:40 AM
Date Issue tna55 ASP.NET 2.0 Basics 4 September 5th, 2007 04:08 AM
Date conversion Issue dhay1999 Access 2 May 30th, 2007 06:47 AM
Date function issue Grafixx01 Access 2 April 11th, 2007 02:32 PM
Date issue, using BETWEEN tdaustin Classic ASP Basics 2 June 8th, 2004 08:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.