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!

Why does code work on one PC but not another?

Status
Not open for further replies.

ArtPM

Technical User
Jun 24, 2002
13
0
0
US
The following code works on PC with WinXP/OfficeXP - Access using Access2000 file format:

Private Sub cboAssignedTo_AfterUpdate()
Dim DB As Database, Q As QueryDef
Dim criteria As String, strSQL As String
Dim ctl As Control
Dim itm As Variant
Dim strDocName As String
strDocName = "_Jacksonville Action Register"
Set DB = CurrentDb()
Set Q = DB.QueryDefs("filterAssignedTo")
Q.SQL = " SELECT AR_Jcvl.*, * FROM AR_Jcvl WHERE (((AR_Jcvl.AssignedTo) Like [Forms]![_Jacksonville Action Register]![cboAssignedTo]))ORDER BY AR_Jcvl.AssignedTo;"
DoCmd.OpenForm strDocName, acViewNormal, "filterAssignedTo"
Exit Sub
End Sub

On another system using WinNT and Access2000, this code works on the first execution, but not after that, unless I initialize the form a or ShowAllRecords twice.

The only difference I see is that one is using MS Object Model 10.0 vesus 9.0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top