acSaveRecord

G

Guest

How can I save a record temporarily.?

Ok this is what happening, My form is used to enter some mortage Loan
application information. (source of this form is tblAcctInfor)
The combobox AcctDescrAvailable( which means is the account description
address available) has values Yes, No, and Unknown. If a user selects no then
a popup box(frmAcctDescInput) pops up for the user to enter the loan address
information and when it closes the information in table tblAcctInfor is
updated.

tblAcctInfor has the Applicants address information the mortgage Loan
address information, AcctDescrAvailable, AcctDecision among other fields.

using the idea that I found in the following website
http://www.rogersaccesslibrary.com/download3.asp?SampleName=OtherProblem.mdb

So I press ok then then the runtime error 2501, the Domenuitem action was
cancelled. If you press debug it points to the DoCmd.DoMenuItem acFormBar,
acEditMenu, acPaste, , acMenuVer70
Which is in the afterupdate procedure of that combobox ...

I hope this is understandable....
*********************AfterUpdate Procedure*********************
Private Sub AcctDescrAvailable_AfterUpdate()
Dim strARG As String
Dim strSQL As String
Dim DocName As String
Dim LinkCriteria As String
Dim Response As Integer
Dim Cancel As Boolean

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

If AcctDescrAvailable.Value = "No" Then
strARG = _
"Account Information, SELECT MailAddressLine1 as
AcctAddrLine1,MailAddressLine2 as AcctAddrLine2, propCity as AcctCity,
MailState as AcctState,MailZipCode as AcctZipCode FROM tblAcctInfor where
[AcctID] = " & AcctID & ";"
DocName = "frmAcctDescInput"
DoCmd.OpenForm DocName, , , LinkCriteria, , , strARG
Else
strSQL = "UPDATE tblAcctInfor SET MailAddressLine1, MailAddressLine2,
MailCity, MailState, MailZipCode= null where [AcctID] =" & AcctID & ";"
CurrentDb.Execute strSQL
End If


End Sub

**********************************************

***************beforeUpdate Procedure**************
If Me!AcctDecision.Column(1) = "Pending" Then
Debug.Print "Pending"
If IsNull(Me!AcctCode) Then
Debug.Print "AcctCode is null. Cancelling."
Cancel = True
strControl = strControl & "Select an Account Name" & vbCrLf
End If
End If
**********************************************
 
J

John Vinson

How can I save a record temporarily.?

Same way you (or your significant other) can get a little bit
pregnant.

A record is saved (written to disk) - or it's not. There's no
"halfway" sort-of-saved state.
Ok this is what happening, My form is used to enter some mortage Loan
application information. (source of this form is tblAcctInfor)
The combobox AcctDescrAvailable( which means is the account description
address available) has values Yes, No, and Unknown. If a user selects no then
a popup box(frmAcctDescInput) pops up for the user to enter the loan address
information and when it closes the information in table tblAcctInfor is
updated.

tblAcctInfor has the Applicants address information the mortgage Loan
address information, AcctDescrAvailable, AcctDecision among other fields.

using the idea that I found in the following website
http://www.rogersaccesslibrary.com/download3.asp?SampleName=OtherProblem.mdb

So I press ok then then the runtime error 2501, the Domenuitem action was
cancelled. If you press debug it points to the DoCmd.DoMenuItem acFormBar,
acEditMenu, acPaste, , acMenuVer70
Which is in the afterupdate procedure of that combobox ...

Ok, I don't understand what you WANT to accomplish. Could you
explain?

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top