A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SQL 2005 Databound Form



 
 
Thread Tools Display Modes
  #1  
Old October 22nd, 2009, 12:48 AM posted to microsoft.public.access.forms
Confused
external usenet poster
 
Posts: 498
Default 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  
Old October 22nd, 2009, 05:04 AM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default 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  
Old October 24th, 2009, 12:29 AM posted to microsoft.public.access.forms
yo
external usenet poster
 
Posts: 1
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.