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

Problem between public var Access 2000 and 2003

P: 7
I have created a form using Access 2000. I declare a public variable

Public lngStartDate as long

I set the variable to 20070101.

I then open a subform based on a query. The criteria for the query is ...WHERE iDate = Forms!frmMyForm.lngStartDate.

The form opens fine and I get the expected data in 2000.

My problem is that when I do the same thing using Access 2003, I am prompted for Forms!frmMyForm.lngStartDate when the form opens.

Any help would be appreciated.
Oct 21 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 489
Change Forms!frmMyForm.IngStartDate to
Oct 21 '08 #2

Expert Mod 15k+
P: 31,494
This is a nuisance (as far as I'm concerned) and is related to changes between the versions. What was working ok, no longer does.

To get around this I use a public function to return any values I need. The variable can go back to being declared as Private. Clearly, when multiple values are required, a Select statement is a sensible solution within the function.
Oct 27 '08 #3

Post your reply

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