You are here: Re: One bound form does NOT save record - please help! « MsSQL Server « IT news, forums, messages
Re: One bound form does NOT save record - please help!

Posted by Bruce on 09/10/07 16:20

On Sep 10, 6:35 am, teddysn...@hotmail.com wrote:
> On 7 Sep, 19:39, Bruce <deluxeinformat...@gmail.com> wrote:
>
> > On Sep 7, 10:44 am, teddysn...@hotmail.com wrote:
> [...]
> > Is this form bound to a table or view in the SQL database or is it
> > updating via code? What is the code behind your "Add" and "Close"
> > buttons?
>
> The form is bound to a table - obviously in this case it's a linked
> table. Not a view.
>
> The "Add" button's code as follows:
>
> Private Sub cmdAddnew_Click()
>
> On Error GoTo cmdAddnew_Click_Err
>
> ' Display Service Bulletin form with blank record
> DoCmd.OpenForm "frmSBIndex", , , , , , gcintAddRecord 'Global Const
> gcintAddRecord As Integer = 0
> Me.Visible = False
>
> cmdAddnew_Click_Exit:
> Exit Sub
>
> cmdAddnew_Click_Err:
> Call modErrorHandler(Err, Erl, Error(Err), "cmdAddnew_Click")
> Resume cmdAddnew_Click_Exit
>
> End Sub
>
> The "Close" button's code as follows:
>
> Private Sub cmdClose_Click()
>
> On Error GoTo cmdClose_Click_Err
>
> DoCmd.Close
> If (modIsloaded("frmSelectSBs")) Then
> Call modDisplayForm("frmSelectSBs")
> End If
>
> cmdClose_Click_Exit:
> Exit Sub
>
> cmdClose_Click_Err:
> Call modErrorHandler(Err, Erl, Error(Err), "cmdClose_Click")
> Resume cmdClose_Click_Exit
>
> End Sub
>
> Does that help? (Obviously there's a bunch of functions such as
> modErrorHandler that won't help at all!)
>
> Edward

It looks pretty straightforward as you describe. The two minute delay
attempting to save the record makes me think that something is timing
out, i.e., it's attempting to save the record but can't for some
reason (perhaps something else has the record locked at that point?),
and your error handler isn't telling you why. Have you tried setting
a breakpoint at Docmd.Close to see if an error is occurring that your
error handler is trapping but simply discarding? Alternatively you
might try setting the 'break on all errors' option under tools,
options, general tab in the VBA editor. Also are there any triggers
on the table on the SQL side that might be causing a problem? Looking
at the error log on the SQL side during the time frame the problems
occur might shed some light on the issue.

Bruce

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация