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

Access 2003 SP3 - Form Opens on One PC But Not Another 1

Status
Not open for further replies.

larrydavid

Programmer
Jul 22, 2010
174
US
Hello,

I have a form that's been working fine for the past year on several machines, but is not even opening on another:

Private Sub CreateNewAlert_Click()
Dim Form_Name As String
Form_Name = "frmAlert"
DoCmd.OpenForm Form_Name, acNormal
End Sub

Also, I have a subform with a checkbox, that the user can click to put a record into Closed status:

Private Sub Closed_Reminder_Click()
If Form_frmAlert.Closed_Reminder = True Then
Form_frmAlert.CLOSED_DATE = Date
Else
Form_frmAlert.CLOSED_DATE = Null
End If
End Sub

The above on the "other" machine returns this when the checkbox is clicked:
Run-time error '2427':
You entered an expression that has no value.

Again, the existing database running on existing machines does not return the above run-time error for the same form.

I've searched throughout resources online, forums (like Tek-Tips), MSKB, blogs, etc. I've checked to make sure the following is the same with what is installed on the PC's that are not having a problem:

Windows XP sp3
MS Access 2003 SP3
Jet Database Engine version (8 and higher)
The VBA references are all the same

The only thing outstanding that I can think of that I need to do is:
Install hotfix for Office Service Pack 3
Recompile VBA modules
Compact and Repair database

Can anyone think of anything I might be missing, other than my hair at this point?

Thanks,
Larry

 
How are ya larrydavid . . .

In your [blue]CreateNewAlert_Click[/blue] sub you have:
Code:
[blue]Form_Name = "[purple][B][I]frmAlert[/I][/B][/purple]"[/blue]
Alls well and good. However in your [blue]Closed_Reminder_Click[/blue] sub you have:
Code:
[blue]If [purple][B][I]Form_frmAlert[/I][/B][/purple].Closed_Reminder = True Then[/blue]
Are you saying thats actually the name of the form ... [purple]Form_frmAlert[/purple]

Typically this would be more like [blue]Forms!frmAlert.CLOSED_DATE[/blue]. Change your form referencing accordingly and see if that does the trick.

BTW ... Have a look here: Refer to Form and Subform properties and controls

[blue]Your Thoughts? ...[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
The form is named "frmAlert"
There is nothing wrong with referencing the form object as
Form_frmAlert
Matter of fact if you want to return properties of closed form the only way to do that is using
Form_formName

There are some subtle differences from returning a reference to a form from the forms collection or directly accessing the forms class.

It sounds to me like frmAlert is corrupted, and that would obviously give you the second error.
 
On the computer where it isn't working, go to the VBA window and then to TOOLS > REFERENCES and make sure that there are none with the word MISSING next to it. If there is, uncheck it and then close things and reopen.

If there isn't a MISSING next to it, then while still in the references, if you have a DAO 3.x (where x is a 51 or 6) checked, uncheck it close the dialog and reopen and find it in the list and check it.

If ADO 2.x is checked and NOT DAO instead then uncheck it and do the same as above.

That reference sometimes has a problem on some computers and needs to be refreshed. Hopefully this is a SPLIT database with a COPY of the frontend on the machine in question and you aren't sharing a common mdb file from a network location.

Bob Larson
FORMER Microsoft Access MVP (2008-2009, 2009-2010)
Free Tutorials/Samples/Tools:
 
Thank you for your valuable input everyone. Much obliged!
Larry
 
Howdy [blue]MajP[/blue] . . .

I'm well aware of the syntax. I just wanted to see if something more tried & true worked or not.

[blue]boblarson[/blue] ... yes ... it certainly sounds like corruption of some sort to me.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top