Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop Up Calendar 2

Status
Not open for further replies.

JCMcAbee

Technical User
Nov 14, 2003
53
US
Access 2003. I have a form that has a command button to print a report. However, I would like for the button to popup a calendar to input a date on the report before it prints it. I have tried the date function, but it only asks for the date to be entered. What I would like is for a calendar to pop up, have the user select a month/date, and have that date entered into a location on the report, before it prints the report.

Any help is very much appreciated. Thank you
 
Name:CboJobNumbers

Row Source:SELECT [tblJobNumbers].[Job Number], [tblJobNumbers].[Distribution Date], [tblJobNumbers].[Area], [tblJobNumbers].[Product(s)] FROM [tblJobNumbers] ORDER BY [Job Number];

Column Count:4

Bound Column:1

Column Widths:1";1";1";1"

Control Source: None
 
It doesn't seem like your value from the combo box is getting to the criteria. I don't have a clue why this would happen. With the form open and a JobNumber selected, open the debug window and enter:
Code:
? Forms![frmRoute Sheet Operations]!cboJobNumber

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Here is what I did. I opened frmRoute Sheet Operations and in form view selected a number for cboJobNumbers. I then switched to design view, went to VB to see the code. I selected debug, selected Add Watch, pasted your code into the expression, selected 'All Procedures. When I clicked OK I received 'Invalid watch expression' so I removed the ? and clicked OK again. In the watches window at the bottom the Value showed <Out of context> and the Type showed Empty.
 
I didn't want you to go to design view or add a watch or all that other stuff.

I just wanted you to open the debug window (press Ctrl+G) and enter the expression as noted earlier.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
As a novice I knew of no other way to get there. After opening the form, I selected '2000' from the combo box, pressed Ctl+G. I pasted your code into the immediate window, pressed enter, and it returned '2000'.
I really do appreciate everything you are doing for me and the patience you have shown.
 
If that is the case, I can't believe that my SQL of 6 Aug 07 17:12 posting wouldn't create a column where every [Job Number] would display 2000.

If you can't figure this out then I would consider accepting a small sample of your MDB to review. You would need to email off forum to enquire how to send me a file that wouldn't be deleted. Or you temporarily post the file on the web somewhere that I could download.

Duane At Hookom Dot Net

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
It works great if I do not use the form. SO I will rebuild the form and cmbo box to see if that does it.
 
More info...
When I preview the report, no records are showing, however, all text boxes with formulas read 'error'.
Don't know if this will help, but I might as well give it a shot.
 
I don't think this has anything to do with your form. The issue is more likely with your report and its record source.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Then it doesn't make sense. If I just run the report without using the form, i.e., double-click on the report from the reports object, it asks for a job number, and runs the report as designed. So it works well from that aspect. However, when I go through the form, it does not work at all.
 
As noted earlier, I about give up without seeing your actual mdb. If you are interested, contact me. There is no charge for this. I am just interested in concluding the thread :).

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
After reviewing the actual MDB, I found the combo box name was Forms![frmRoute Sheet Operations]!cboJobNumbers not Forms![frmRoute Sheet Operations]!cboJobNumber.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top