×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Data entry or data view? that is the question
2

Data entry or data view? that is the question

Data entry or data view? that is the question

(OP)
Greetings all - it's been a while.
I have a form designed to show records of a customer's machines. I open the form from another form using an SQL string to show the customer's info required. This has a global variable set as SqlSet2=true. The form on open checks the sqlset and opens to display the data.
I would like to use the same form accessed from a different form for data entry only, this would have a different SQL string as recordset, with a different global variable set as True.
I have tried using the instruction DoCmd.OPENFORM (frmName,,,,acFormAdd) but this refuses to compile, insisting on an = sign.
Unless one of you experts can help I am going to have to use a duplicate form.
Thanks

Telephoto

RE: Data entry or data view? that is the question

Did you copy this from your code?
Did you include the ()s?
I assume you set the value of frmName someplace?

You haven't provided much information about your variable and record sources but this shouldn't cause a compile issue.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Data entry or data view? that is the question

Try without parentheses: DoCmd.OPENFORM frmName,,,,acFormAdd. Arguments in parentheses are used when you set a variable and there is a function with or without arguments on the right side.

combo

RE: Data entry or data view? that is the question

(OP)
Hello to both.
Duane, it's been a while - how was Switzerland?

I've awarded a star each, between you my problem is solved.

Using Docmd.Openform ("frmname",,,,acFormAdd) generates the compile error.
I must define "frmName" as a variable, then
Docmd.openform stdocname,,,,acFormAdd without () works a treat.

Many thanks

T

RE: Data entry or data view? that is the question

Good to hear you got this worked out.

Switzerland was wonderful. Lots of great adventures!

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close