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!

'Object doesn't support this property or method' error when upsizing

Status
Not open for further replies.

spizotfl

MIS
Aug 17, 2005
345
US
Hi, I have an access db that may well need to be upsized to sql server. right now i am testing with the express edition.
i have a form with 2 subforms. one subform shows a summary of the records for this mainform, the other subform shows related summary information. when you click a line of the 2nd subform, the form with the full record opens just fine. when you click on a record in the first subform i want it to change the current record in the mainform to the one selected in the subform. i found or someone helped me with this many moons ago to get this solution:
Code:
Private Sub txtEvalDate_DblClick(Cancel As Integer)
If Me.Parent.Tag = "Outcomes" Then
    Me.Parent.RecordsetClone.FindFirst "[EvalDate] = #" & Me![txtEvalDate] & "#"
    Me.Parent.Bookmark = Me.Parent.RecordsetClone.Bookmark
Else
    DoCmd.OpenForm "frmSAOutcomes New forms layout", , , "[SSN] = '" & Me.txtSSN & "' AND [EvalDate] = #" & Me.txtEvalDate & "#", acFormEdit
End If

End Sub
this works great in access, but in testing in the upsized environment, it crashes with the following error:
"Object doesn't support this property or method"
and the highlighted code from the debuggger is the line Me.Parent.RecordsetClone.FindFirst. i think this is because this is DAO and i need to convert it to ADO, but i have no clue on how to do it. i would appreciate any guidance into how to pull this off.
thanks

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
i don't think i understand what you are suggesting. isn't BOF a way to check for the beginning of the recordset?

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
as i understand it, findFirst uses the criteria afterwards to find the record that matches that criteria

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
i am not trying to get a value, i am trying to change the record displayed on the mainform. basically the subform provides navigation to the mainform. i don't see how dlookup would help with that....

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
That is how i interpreted your code...

Me.Parent.RecordsetClone.FindFirst "[EvalDate] = #" & Me![txtEvalDate] & "#"
Me.Parent.Bookmark = Me.Parent.RecordsetClone.Bookmark

Me.Parent.RecordsetClone.FindFirst "[EvalDate] = #" & Me![txtEvalDate] & "#" find the first row where evaldate matches txtevaldate.

then store it in bookmark to write it down after.

Yes indeed I had misread... have you tried going through SQL functions?
 
which functions? the way the form was originally setup, in access, was as bound to the underlying table. i am not sure exactly how this is working in the adp.
thanks for the help to this point

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
how about creating a query where you go search for that row and grouping it with another field that has the hour of entry?
 
are you suggesting dynamically changing the recordsource of the form? i am really just looking for a way to update the dao to ado code, if it is even possible (if it even is a dao code issue). i can look at changing the recordsource on the fly, but that would require more work that if there is an easy way to do like the old code did.

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
Have you tried this ?
Me.Parent.RecordsetClone.Find "[EvalDate] = #" & Me![txtEvalDate] & "#"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
just tried it, but it spits out that same "Object doesn't support this property or method" error...

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
yes they do. this all works fine as an access only system. after going through the upsize wizard, this part now throws out the error. i think it has something to do with dao vs ado. isn't the me.parent.recordsetclone thing dao? is there an ado equivalent? i don't know enough about it, i just think that i read somewhere that dao code can be a problem when upsizing.

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top