DoCmd.OpenForm

  • Thread starter Thread starter Alejandro González Anselmi
  • Start date Start date
A

Alejandro González Anselmi

Hi
I have an access fe application with several forms on one form
I call another form using the
DoCmd.OpenForm formName, , ,condition
where condition contains something like id=x
it works perfect

Now, I have migrated the db to SQL keeping the front end application on
access
If I try to execute the same statement it does nothing,
doesn't even pass trough the load sub from the form

any suggestions
Thanks
alejandro
 
Hi, Alejandro.

Check the data type of the ID field in the table in SQL Server. If it's now
equivalent to a string data type (char, varchar, et cetera), whereas it used
to be a numerical data type in Access, then you'll need to change the syntax
of your WHERE condition. (The syntax you show in your message indicates it
was originally a numerical data type in Access.) Either that or change the
data type in SQL Server to indicate a numerical data type.

And you won't get an error message while running your VBA procedure if
you're using "On Error Resume Next" so you'll be oblivious if an error
occurs when opening the form, which may explain why you mentioned "If I try
to execute the same statement it does nothing."

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
Assuming you are talking about an Access Database (MDB / MDE file format),
check the linked Tables that are being use as the RecordSource of the Form.

Can you access/see the data in the DatasheetView of the linked Tables?

HTH
Van T. Dinh
MVP (Access)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top