By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,388 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,388 IT Pros & Developers. It's quick & easy.

Recordset question - strategy needed

P: n/a
I have a form (in continuous form view) from which I choose a record
by double-clicking the SRC_CUST_NAME textbox whic opens another form
showing all the details of that record. I do this by having ALL the
fields (most of them hidden) transfer to the detail for through a
series of code lines below like: "[Forms]![frmCustDetail]![PEP_POINT]
= [Forms]![frmMain]![subCustomers]![PEP_POINT]" (see bottom of post).
This is working so well I hate to tamper with it but I'd like to be
able to edit the resulting data displayed. I wrote code to allow
edits:

Private Sub AllowEdits_Click()
Me.Form.AllowEdits = True
End Sub

But this obviously will not SAVE the changes since it is not directly
connected to the table or a recordset. Any ideas?
Thanks!!!
Private Sub SRC_CUST_NAME_DblClick(Cancel As Integer)
On Error GoTo Err_SRC_CUST_NAME_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCustDetail"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Forms]![frmCustDetail]![SRC_CUST_NAME] = [Forms]![frmMain]!
[subCustomers]![SRC_CUST_NAME]
~
~
[Forms]![frmCustDetail]![PEP_POINT] = [Forms]![frmMain]![subCustomers]!
[PEP_POINT]
[Forms]![frmCustDetail]![PEP_CA_NAME] = [Forms]![frmMain]!
[subCustomers]![PEP_CA_NAME]
[Forms]![frmCustDetail]![PEP_CA_TYPE] = [Forms]![frmMain]!
[subCustomers]![PEP_CA_TYPE]
Exit_SRC_CUST_NAME_Click:
Exit Sub
Err_SRC_CUST_NAME_Click:
MsgBox Err.Description
Resume Exit_SRC_CUST_NAME_Click
End Sub

May 29 '07 #1
Share this Question
Share on Google+
2 Replies

P: n/a
On May 29, 2:47 pm, slinky <campbellbrian2...@yahoo.comwrote:
I have a form (in continuous form view) from which I choose a record
by double-clicking the SRC_CUST_NAME textbox whic opens another form
showing all the details of that record. I do this by having ALL the
fields (most of them hidden) transfer to the detail for through a
series of code lines below like: "[Forms]![frmCustDetail]![PEP_POINT]
= [Forms]![frmMain]![subCustomers]![PEP_POINT]" (see bottom of post).
This is working so well I hate to tamper with it but I'd like to be
able to edit the resulting data displayed. I wrote code to allow
edits:

Private Sub AllowEdits_Click()
Me.Form.AllowEdits = True
End Sub

But this obviously will not SAVE the changes since it is not directly
connected to the table or a recordset. Any ideas?
Thanks!!!

Private Sub SRC_CUST_NAME_DblClick(Cancel As Integer)
On Error GoTo Err_SRC_CUST_NAME_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCustDetail"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Forms]![frmCustDetail]![SRC_CUST_NAME] = [Forms]![frmMain]!
[subCustomers]![SRC_CUST_NAME]
~
~
[Forms]![frmCustDetail]![PEP_POINT] = [Forms]![frmMain]![subCustomers]!
[PEP_POINT]
[Forms]![frmCustDetail]![PEP_CA_NAME] = [Forms]![frmMain]!
[subCustomers]![PEP_CA_NAME]
[Forms]![frmCustDetail]![PEP_CA_TYPE] = [Forms]![frmMain]!
[subCustomers]![PEP_CA_TYPE]
Exit_SRC_CUST_NAME_Click:
Exit Sub
Err_SRC_CUST_NAME_Click:
MsgBox Err.Description
Resume Exit_SRC_CUST_NAME_Click
End Sub
try running an update query based on your temp data

May 30 '07 #2

P: n/a
Baz
Why not just bind frmCustDetail to the table? The only tampering you would
need to do with your code which copies the values is to remove it or comment
it out.

"slinky" <ca***************@yahoo.comwrote in message
news:11**********************@q66g2000hsg.googlegr oups.com...
I have a form (in continuous form view) from which I choose a record
by double-clicking the SRC_CUST_NAME textbox whic opens another form
showing all the details of that record. I do this by having ALL the
fields (most of them hidden) transfer to the detail for through a
series of code lines below like: "[Forms]![frmCustDetail]![PEP_POINT]
= [Forms]![frmMain]![subCustomers]![PEP_POINT]" (see bottom of post).
This is working so well I hate to tamper with it but I'd like to be
able to edit the resulting data displayed. I wrote code to allow
edits:

Private Sub AllowEdits_Click()
Me.Form.AllowEdits = True
End Sub

But this obviously will not SAVE the changes since it is not directly
connected to the table or a recordset. Any ideas?
Thanks!!!
Private Sub SRC_CUST_NAME_DblClick(Cancel As Integer)
On Error GoTo Err_SRC_CUST_NAME_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCustDetail"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Forms]![frmCustDetail]![SRC_CUST_NAME] = [Forms]![frmMain]!
[subCustomers]![SRC_CUST_NAME]
~
~
[Forms]![frmCustDetail]![PEP_POINT] = [Forms]![frmMain]![subCustomers]!
[PEP_POINT]
[Forms]![frmCustDetail]![PEP_CA_NAME] = [Forms]![frmMain]!
[subCustomers]![PEP_CA_NAME]
[Forms]![frmCustDetail]![PEP_CA_TYPE] = [Forms]![frmMain]!
[subCustomers]![PEP_CA_TYPE]
Exit_SRC_CUST_NAME_Click:
Exit Sub
Err_SRC_CUST_NAME_Click:
MsgBox Err.Description
Resume Exit_SRC_CUST_NAME_Click
End Sub

May 30 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.