Solved

Open new form at current record

Posted on 2014-11-10
1
334 Views
Last Modified: 2014-11-11
Hi,
I am looking for a bit of help

I have a form in datasheet view named "frm_qry_peding_records" when I click on "ID" i want to go to another form "frm_qry_tbl_main_edit" and open the record. Here is the query I tried

If Not Me.NewRecord Then
DoCmd.OpenForm "frm_qry_tbl_main_edit",,, where Forms.frm_qry_tbl_main_edit.ID = me.ID
End If

Open in new window


I'm get an erro. Please help
0
Comment
Question by:damixa
1 Comment
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 40433623
you have the syntax wrong.  Try:

If Not Me.NewRecord Then
    DoCmd.OpenForm "frm_qry_tbl_main_edit",,, "[ID] = " & me.ID
End If
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question