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

Open form to correct record from datasheet

Open form to correct record from datasheet

Open form to correct record from datasheet

I want to have a user "double-click" on a field or two in a record in a form that is in datasheet view (actually it is a subform) and have an entirely different form open to that record.  Any thoughts?  I have tried using CurrentRecord in a few different ways, but it is not working????

RE: Open form to correct record from datasheet

Code behind the Double Click event.

    Dim DocName As String, YourVariable as String, Quote as String
    QUOTE = Chr$(34)  '- double quote for text fields, numeric omit
    YourVariable = Me.YourVariable
     DocName = "YourForm"
    WhereClause = " yourKey = " & QUOTE & YourVariable & QUOTE  
    DoCmd.OpenForm DocName, , , WhereClause

Make sure the form you are opening has allow filter on. This will open your form with the one record that you double clicked on. If you want all the records then just open without the filter (where clause).


RE: Open form to correct record from datasheet

The WhereClause above should have been Dimmed as a string.
Dim WhereClause as String

Sorry if it caused a problem.

RE: Open form to correct record from datasheet

Thanks!  I eventually got this to work!!

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