Connecting Tech Pros Worldwide Forums | Help | Site Map

Recordset question - strategy needed

slinky
Guest
 
Posts: n/a
#1: May 29 '07
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


lgeastwood@gmail.com
Guest
 
Posts: n/a
#2: May 30 '07

re: Recordset question - strategy needed


On May 29, 2:47 pm, slinky <campbellbrian2...@yahoo.comwrote:
Quote:
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

Baz
Guest
 
Posts: n/a
#3: May 30 '07

re: Recordset question - strategy needed


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" <campbellbrian2001@yahoo.comwrote in message
news:1180468072.737865.294990@q66g2000hsg.googlegr oups.com...
Quote:
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
>

Closed Thread


Similar Microsoft Access / VBA bytes