INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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.

Jobs

DoCmd.RunCommand acCmdRecordsGoToNew

DoCmd.RunCommand acCmdRecordsGoToNew

(OP)
I have a form in which all the controls are bound by the Recordsource of the form, when the form loads it bring sup all the 100 records from the two tables that are used to link the queries as the recordsource, all the controls are being non editable, so i gave the following but it doesnt do anything at all

Dim ctrl As Control

For Each ctrl In Me.Controls

ctrl.Locked = False

Next

Me.DataEntry = True
DoCmd.RunCommand acCmdRecordsGoToNew

also tried
DoCmd.GoToRecord , , acNewRec

RE: DoCmd.RunCommand acCmdRecordsGoToNew

Open your query directly and see if you can make edits. If not, the query is your problem. In order to edit records in a query I think the join has to a unique index on one of the two tables. Don't remember all the rules but I think this is going to be your problem.

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That DonÆt.

http://www.thelegacyreturns.com/

RE: DoCmd.RunCommand acCmdRecordsGoToNew

(OP)
Thanks Blorf, that makes a lot of sense,the table I created for this is a Linked Table that is linked to oracle database, and I just used another table to mimic this table,i did like Create table B as select * from A, so I am not sure if it brought all the constraints and everything along

RE: DoCmd.RunCommand acCmdRecordsGoToNew

That would do it. Make table queries do not bring along any indexes or constraints.

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That DonÆt.

http://www.thelegacyreturns.com/

RE: DoCmd.RunCommand acCmdRecordsGoToNew

(OP)
I forgot to run the scripts that created the indexes(of course had to change the name of the indexes and triggers) and triggers, I ran them and now the form works fine, however some of the controls have values like #Name? instead of a blank, why is that?these are text boxes by the way

RE: DoCmd.RunCommand acCmdRecordsGoToNew

Most common cause for #Name is a form field is bound to a field name that doesn't exist. Second, if the field is calculated and calls on a field not there, or calls on it's self, those will do it also.

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That DonÆt.

http://www.thelegacyreturns.com/

RE: DoCmd.RunCommand acCmdRecordsGoToNew

(OP)
Thanks again,fixed it too, was funny, there was a check box and the table name given for the bound field was incorrect, until I change it, it was also locked in blue color..

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!

Resources

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