|  | Posted by  teddysnips on 09/10/07 11:35 
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
 [Back to original message] |