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

GOTORECORD not behaving as expected in subform.

GOTORECORD not behaving as expected in subform.

(OP)
Part of the code that I want to execute when a particular command button is clicked upon, is to move to the first record of the form. This is a small form in which all 14 records of the small dataset in 'continuous' mode. The number of records never changes, as they are just settings to be used elsewhere, so we toggle them in this small form.
This command button is for setting them back to their defaults which are just stored in an unseen field in the same form. Hence the 'Set to Defaults' button just runs a little UPDATE SQL that changes 'Current_State' to 'Default'.
That all works fine with one caveat, which is that whatever the last record that was changed was doesn't update unless you have since left that record. Hence in my code before running the SQL, I want to move them out of that record.
I plan to do this by sending them to the first record and then to the next record (in case they were already on the first record). It is further noted that this form is a subform and the command button resides on this subform itself, not the parent form.

So, I use:
DoCmd.GoToRecord acDataForm, "AP_Parameter_Selection!AP_Parameter_Subform_Search_Fields" , acFirst

and I've tried every combination of using/not using quotes, brackets, not specifying parent form, using "Forms!", etc. that I can think of and nothing works.
In most variations I get an error message telling that the specified form is not open. What am I doing wrong?

RE: GOTORECORD not behaving as expected in subform.

See my reply in the Access forum.

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