Moving from access to sql (forms)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i am trying to move my database to sql. and now my forms will not work
it is a combo box that selects a product and then shows the correct subform
but now it gives me an error.

this is the code for the box

Private Sub Combo26_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ProductID] = " & Str(Nz(Me![Combo26], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

thanks in advance
im new to sql so pleas forgive ne
 
Run-time error '438':

Obgect doesn't support this property or method

thanks

Arvin Meyer said:
That code is the standard combobox find code. I have used it successfully
with SQL-Server to return a record. What is the error message you are
getting?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access

Jon said:
i am trying to move my database to sql. and now my forms will not work
it is a combo box that selects a product and then shows the correct subform
but now it gives me an error.

this is the code for the box

Private Sub Combo26_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ProductID] = " & Str(Nz(Me![Combo26], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

thanks in advance
im new to sql so pleas forgive ne
 
Do you have DAO (or ADO) checked as a reference? Which one? Which version?

Tools ... References

from any code window.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Jon said:
Run-time error '438':

Obgect doesn't support this property or method

thanks

Arvin Meyer said:
That code is the standard combobox find code. I have used it successfully
with SQL-Server to return a record. What is the error message you are
getting?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access

Jon said:
i am trying to move my database to sql. and now my forms will not work
it is a combo box that selects a product and then shows the correct subform
but now it gives me an error.

this is the code for the box

Private Sub Combo26_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ProductID] = " & Str(Nz(Me![Combo26], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

thanks in advance
im new to sql so pleas forgive ne
 
Tools...References is grayed out

Arvin Meyer said:
Do you have DAO (or ADO) checked as a reference? Which one? Which version?

Tools ... References

from any code window.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Jon said:
Run-time error '438':

Obgect doesn't support this property or method

thanks

Arvin Meyer said:
That code is the standard combobox find code. I have used it successfully
with SQL-Server to return a record. What is the error message you are
getting?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access

i am trying to move my database to sql. and now my forms will not work
it is a combo box that selects a product and then shows the correct
subform
but now it gives me an error.

this is the code for the box

Private Sub Combo26_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ProductID] = " & Str(Nz(Me![Combo26], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

thanks in advance
im new to sql so pleas forgive ne
 
Are you talking about a mdb file here with linked tables to sql server...or
are you talking about a adp project?

With a adp project, you have to re-write all your old dao code. So, if you
are migrating from a mdb to sql server, the recommend path for *existing*
projects is to NOT convert to a adp..but use linked odbc tables, since then
all of your dao code will continue to run..

You want to clarify how your links to sql server are setup..(ie: adp...or
odbc?).
 
It will be grayed out if you try to do it while the code is in break mode.
Click the Reset button (the little square one) and you'll be able to open
and set references.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Jon said:
Tools...References is grayed out

Arvin Meyer said:
Do you have DAO (or ADO) checked as a reference? Which one? Which version?

Tools ... References

from any code window.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Jon said:
Run-time error '438':

Obgect doesn't support this property or method

thanks

:

That code is the standard combobox find code. I have used it successfully
with SQL-Server to return a record. What is the error message you are
getting?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access

i am trying to move my database to sql. and now my forms will not work
it is a combo box that selects a product and then shows the correct
subform
but now it gives me an error.

this is the code for the box

Private Sub Combo26_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ProductID] = " & Str(Nz(Me![Combo26], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

thanks in advance
im new to sql so pleas forgive ne
 
Back
Top