Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 589145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:23:34+00:00 2026-05-13T15:23:34+00:00

Warning: I am very new to Access coding. I am used to .NET and

  • 0

Warning: I am very new to Access coding.
I am used to .NET and PHP

I just converted an Access 95 program to Access 2007 and I got it all working now I am trying to make some updates.

I have a form that updates a table in the database but I can’t find an attached query or anywhere where it actually does a SQL statement. Please help. And thank you.

This is all the code on the one form.

    Option Compare Database
`enter code here`Option Explicit
Private Sub Check158_Click()

    ' Try and change sql code
    Me.Combo35.RowSource = "SelectAllOrders"
End Sub

Private Sub Combo35_AfterUpdate()
                                                                                                                                                                                                                            Me.RecordsetClone.FindFirst "[OrderID] = " & Me![Combo35]
    Me.Bookmark = Me.RecordsetClone.Bookmark
    ' Find the record that matches the control.
End Sub

Private Sub Command122_Click()
On Error GoTo Err_Command122_Click


    DoCmd.Close

Exit_Command122_Click:
    Exit Sub

Err_Command122_Click:
    MsgBox Err.Description
    Resume Exit_Command122_Click

End Sub

Private Sub Customer_AfterUpdate()
Forms![Orders]![CustomerID] = [Forms]![Orders]![Customer].Column(0)

Forms![Orders]![Phone] = [Forms]![Orders]![Customer].Column(2)
End Sub

Private Sub Frame40_AfterUpdate()
'Forms![Orders]![Orders Subform].Form![Quantity]
If Forms![Orders]![Frame40] = 1 Then
   ' Me![Orders By Customer Subform].[Requery
   Forms![Orders]![Child81].Form![ProductID].RowSource = "StdPrice"
   Else
   Forms![Orders]![Child81].Form![ProductID].RowSource = "PvtPrice"
End If
End Sub
Private Sub Command131_Click()
On Error GoTo Err_Command131_Click

    Me![Invoice Total] = Forms![Orders]![Child81].Form![Order Subtotal]
    DoCmd.GoToRecord , , acNewRec

Exit_Command131_Click:
    Exit Sub

Err_Command131_Click:
    MsgBox Err.Description
    Resume Exit_Command131_Click

End Sub
Private Sub Command132_Click()
On Error GoTo Err_Command132_Click
    'Cancel Click for Orders

    If Me.Dirty Then DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
    Me![Invoice Total] = Forms![Orders]![Child81].Form![Order Subtotal]
    DoCmd.Close


Exit_Command132_Click:
    Exit Sub

Err_Command132_Click:
    MsgBox Err.Description
    Resume Exit_Command132_Click

End Sub
Private Sub Command133_Click()
On Error GoTo Err_Command133_Click
    'Save and Exit Click

    Me![Invoice Total] = Forms![Orders]![Child81].Form![Order Subtotal]
    DoCmd.Close

Exit_Command133_Click:
    Exit Sub

Err_Command133_Click:
    MsgBox Err.Description
    Resume Exit_Command133_Click

End Sub
Private Sub Command134_Click()
On Error GoTo Err_Command134_Click


    DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70

Exit_Command134_Click:
    Exit Sub

Err_Command134_Click:
    MsgBox Err.Description
    Resume Exit_Command134_Click

End Sub
Private Sub Command136_Click()
On Error GoTo Err_Command136_Click

    DoCmd.GoToRecord , , acNext

Exit_Command136_Click:
    Exit Sub

Err_Command136_Click:
    MsgBox Err.Description
    Resume Exit_Command136_Click

End Sub
Private Sub Command138_Click()
On Error GoTo Err_Command138_Click

    Me![Invoice Total] = Forms![Orders]![Child81].Form![Order Subtotal]

    DoCmd.GoToRecord , , acNext

Exit_Command138_Click:
    Exit Sub

Err_Command138_Click:
    MsgBox Err.Description
    Resume Exit_Command138_Click

End Sub
Private Sub Command148_Click()
On Error GoTo Err_Command148_Click

    Dim stDocName As String

    stDocName = "Container Card"
    DoCmd.OpenReport stDocName, acPreview, , "[OrderID] = Forms![Orders]![OrderID]"

Exit_Command148_Click:
    Exit Sub

Err_Command148_Click:
    MsgBox Err.Description
    Resume Exit_Command148_Click

End Sub

Private Sub Form_Close()
'    Me![Invoice Total] = Forms![Orders]![Child81].Form![Order Subtotal]

End Sub

And a SUB form

Option Compare Database
Option Explicit


Private Sub Form_AfterDelConfirm(Status As Integer)
    Forms![Orders]![Child81].Requery
End Sub

Private Sub Form_Open(Cancel As Integer)
'If Forms![Orders]![Frame40] = 1 Then
'   Me![ProductID].RowSource = "StdPrice"
'   Else
'   Me![ProductID].RowSource = "PvtPrice"'
'End If


End Sub


Private Sub ProductID_NotInList(NewData As String, Response As Integer)
    MsgBox "Double-click this field to add an entry to the list."
    Response = acDataErrContinue
End Sub
Private Sub ProductID_AfterUpdate()
 Dim pos As Variant
    Me![UnitPrice] = Me![ProductID].Column(2)
    Me![ProductName] = Me![ProductID].Column(1)
    Me![GLAcct] = Me![ProductID].Column(3)
    Me.Dirty = False
End Sub
Private Sub ProductID_DblClick(Cancel As Integer)
On Error GoTo Err_ProductID_DblClick
    Dim lngProductID As Long

    If IsNull(Me![ProductID]) Then
        Me![ProductID].Text = ""
    Else
        lngProductID = Me![ProductID]
        Me![ProductID] = Null
    End If
    DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
    Me!ProductID.Requery
    If lngProductID <> 0 Then Me![ProductID] = lngProductID

Exit_ProductID_DblClick:
    Exit Sub

Err_ProductID_DblClick:
    MsgBox Err.Description
    Resume Exit_ProductID_DblClick
End Sub

Private Sub Command20_Click()
On Error GoTo Err_Command20_Click


    DoCmd.GoToRecord , , acNewRec

Exit_Command20_Click:
    Exit Sub

Err_Command20_Click:
    MsgBox Err.Description
    Resume Exit_Command20_Click

End Sub
Private Sub Command22_Click()
On Error GoTo Err_Command22_Click


    DoCmd.GoToRecord , , acNext

Exit_Command22_Click:
    Exit Sub

Err_Command22_Click:
    MsgBox Err.Description
    Resume Exit_Command22_Click

End Sub
Private Sub Command23_Click()
On Error GoTo Err_Command23_Click


    DoCmd.GoToRecord , , acFirst

Exit_Command23_Click:
    Exit Sub

Err_Command23_Click:
    MsgBox Err.Description
    Resume Exit_Command23_Click

End Sub
Private Sub Command24_Click()
On Error GoTo Err_Command24_Click


    DoCmd.GoToRecord , , acPrevious

Exit_Command24_Click:
    Exit Sub

Err_Command24_Click:
    MsgBox Err.Description
    Resume Exit_Command24_Click

End Sub
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click


    DoCmd.GoToRecord , , acLast

Exit_Command25_Click:
    Exit Sub

Err_Command25_Click:
    MsgBox Err.Description
    Resume Exit_Command25_Click

End Sub
Private Sub Command26_Click()
On Error GoTo Err_Command26_Click


    DoCmd.GoToRecord , , acNext

Exit_Command26_Click:
    Exit Sub

Err_Command26_Click:
    MsgBox Err.Description
    Resume Exit_Command26_Click

End Sub

Private Sub Quantity_AfterUpdate()
Dim pos As Variant
'Me.Dirty = False

End Sub

Private Sub UnitPrice_AfterUpdate()
Dim pos As Variant
'Me.Dirty = False

End Sub
Private Sub Command33_Click()
On Error GoTo Err_Command33_Click


    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Command33_Click:
    Exit Sub

Err_Command33_Click:
    MsgBox Err.Description
    Resume Exit_Command33_Click

End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:23:34+00:00Added an answer on May 13, 2026 at 3:23 pm

    The form in your first example is likely a databound form – it should have a datasource set, which will be the query or table used to populate the fields on the form. If you edit values on the form, and close the form, it will automatically commit changes to the tables underlying that query.

    The second example has some navigation buttons…navigating away from the current record should automatically cause a commit as well. Again, look at the datasource property of the form to work out what it’s updating.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Warning - I am very new to NHibernate. I know this question seems simple
I'm very new to .Net and WPF and have a problem. The code is
I am very new in android Development. I am getting a warning when i
Im very new to php and i have a page with 5 includes located
I'm very new to dealing with bits and have got stuck on the following
I'm very new to PHP. I have a line of code on a server
Warning: I am still very new to NHibernate and Fluent! I have a mapping
I am very new to PHP, trying to write a script which connects to
Very new to PHP/programming in general, and I've been trying to run a PHP
I am very new to iOS development, I have an app all set and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.