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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migrating to Access2003

Status
Not open for further replies.

sineados

Programmer
Oct 17, 2001
34
IE
Hi

I have recently moved from Windows 2000 and Access2000 to Windows XP and Access2003.

One of my reports references public variables on a form. It works fine on Win2K/Access2000 but not on XP/2003. Some of the machines it works on have access2002 on them so I am wondering is it a file or something I am missing.

Any one any ideas. I tried it with a new report and form and it doesn't work either so I don't think its references or anything like that, maybe I am wrong though.

thanks for any help
 
This looks like a tough one. Could you give a little more detail? I'm assuming when you say Public variables, these are defined as Public within the form? Or do you mean Global and are defined in a regular module? Plus some description of how the variable is used on the form and within the report would help too.
 
hi

thanks for replying. So I have a form with a From Date and a To date which are DTPicker controls and a command button. I have code behind the button. the button sets the variables below.

The variables are declared in the declarations section of the form as so

Public MMLate As Long
Public MMPaperLate As Long
Public OthersLate As Long
Public PaperLate As Long
Public RevRecLate As Long

The variable is set by using this piece of code
MMLate = MMLate + 1
going through a loop.

Stepping through the code it does set the variable.

I then have a report which is called from the button as well. The report has a textbox whose controlsource property is set to =[Forms]![Clares Metrics Form].MMLate

It also has a textbox which references the DTPicker like this controlsourceproperty =Format([Forms]![Clares Metrics Form]![DTPickerFrom],"dd-mmm-yyyy")

The DTPicker works fine but the .MMLate variable only displays #name? in the textbox.

I created a new form and new report and did the same thing but it didn't work then either.

I have checked the references and updated versions but it doesn't seem to work. It only works on a machine that has both versions of Access but I don't want to put both versions on all machines.

Just looking at your reply, I haven't tried putting the variables in the module which I can try but would prefer if there was a way of fixing it rather than changing the code.

thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top