By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,686 Members | 2,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,686 IT Pros & Developers. It's quick & easy.

Passing a date value from vb6 to access 2003

P: 63
I have a program built in Visual Basic 6. It uses an Access 2003 database. My report selection form in vb6 has 2 date pickers for start date and end date. The report is an Access report. When the user selects a start and end date in vb6 form, I would like to show the 2 values of the date pickers from the vb6 form on the top of the Access report so they will see the date range values they selected on the report. I have had no luck. Does anyone know if it is even possible to do?

Thank you
Apr 15 '07 #1
Share this Question
Share on Google+
2 Replies


ADezii
Expert 5K+
P: 8,610
I have a program built in Visual Basic 6. It uses an Access 2003 database. My report selection form in vb6 has 2 date pickers for start date and end date. The report is an Access report. When the user selects a start and end date in vb6 form, I would like to show the 2 values of the date pickers from the vb6 form on the top of the Access report so they will see the date range values they selected on the report. I have had no luck. Does anyone know if it is even possible to do?

Thank you
It is possible and off the top of my head, the easiest Method would be:

  1. Save the Start Date from Date Picker1 to the Registry via SaveSetting()
  2. Save the End Date from Date Picker2 to the Registry via SaveSetting()
  3. In the Open() Event of your Report, retrieve the Registry values for both the Start and End Dates via GetSetting()
  4. Create a Caption for the Report in its Open() Event by building a String from the retrieved values: Me.Caption = "Report Period from " & GetSetting() - Start & " to " & GetSetting() - End
  5. NOTE: I'm assuming that you know the syntax for both SaveSetting() and GetSetting() which can both be utilized within either environment (VB6 or VBA)
Apr 15 '07 #2

P: 1
Can I kiss you ?
That solution is what I was looking for... the last week !
Regards,
Marc
Mar 24 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.