If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
SQL 2005 Databound Form
I just upsized a Access 2007 (accdb) and created linked tables to SQL 2005.
The form is databound to a query result of two joining tables. The form's property sheet has Recordset Type = Dynaset, Fetch Defaults=Yes. The form has an Add New button with embedded macro (GoToRecord , , new). This worked fine before the upsizing. Now clicking the same button, I got "You can't go to the specified record". I change the button On Click event to an Event Procedure like the following. I still get the same error (Runtime error 2046, 2015). Please help. Private Sub Command91_Click() DoCmd.GoToRecord acDataForm, "frmTransferForm", acNewRec End Sub |
#2
|
|||
|
|||
SQL 2005 Databound Form
On Wed, 21 Oct 2009 16:48:01 -0700, Confused
wrote: Is that query updatable? If not, you may be missing some primary keys. A form bound to a query joining two tables: unusual. -Tom. Microsoft Access MVP I just upsized a Access 2007 (accdb) and created linked tables to SQL 2005. The form is databound to a query result of two joining tables. The form's property sheet has Recordset Type = Dynaset, Fetch Defaults=Yes. The form has an Add New button with embedded macro (GoToRecord , , new). This worked fine before the upsizing. Now clicking the same button, I got "You can't go to the specified record". I change the button On Click event to an Event Procedure like the following. I still get the same error (Runtime error 2046, 2015). Please help. Private Sub Command91_Click() DoCmd.GoToRecord acDataForm, "frmTransferForm", acNewRec End Sub |
#3
|
|||
|
|||
SQL 2005 Databound Form
Thank you for the reply. Could you tell me what is the usual way to
design form where the data source is from a joined tables query? Should this be splitted into master and sub forms? Should it be based on a SQL PassThrough query, and have a Instead Of Trigger on the SQL Server to process the new record insert? Thank you and have a nice weekend. On Oct 21, 9:04*pm, Tom van Stiphout wrote: On Wed, 21 Oct 2009 16:48:01 -0700, Confused wrote: Is that query updatable? If not, you may be missing some primary keys. A form bound to a query joining two tables: unusual. -Tom. Microsoft Access MVP I just upsized a Access 2007 (accdb) and created linked tables to SQL 2005. * The form is databound to a query result of two joining tables. *The form's property sheet has Recordset Type = Dynaset, Fetch Defaults=Yes. *The form has an Add New button with embedded macro (GoToRecord , , new). * This worked fine before the upsizing. *Now clicking the same button, I got "You can't go to the specified record". *I change the button On Click event to an Event Procedure like the following. *I still get the same error (Runtime error 2046, 2015). *Please help. Private Sub Command91_Click() * *DoCmd.GoToRecord acDataForm, "frmTransferForm", acNewRec End Sub |
Thread Tools | |
Display Modes | |
|
|