|
 |
access thread: Passing Data between forms
Message #1 by rwalker@w... on Fri, 22 Feb 2002 17:47:07
|
|
I want to enter data on one form(Main Form), then open another form with
the same information that was entered on the first form(Main Form). Can
anyone tell me how I should go about doing this? So far, what I'm doing
is not working.
Thanks
Message #2 by "John Ruff" <papparuff@c...> on Fri, 22 Feb 2002 10:41:30 -0800
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0012_01C1BB8D.7D9C1B50
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Here you go
Private Sub cmdOpenForm_Click()
On Error GoTo Err_cmdOpenForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
' if the field being searched is a text field,
' use this code
stLinkCriteria = "[CustomerID]='" & cboCustomer & "'"
' if the field being searched is a numeric field,
' use this code
stLinkCriteria = "[CustomerID]=" & cboCustomer
stDocName = "frmOrders"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenForm_Click:
Exit Sub
Err_cmdOpenForm_Click:
MsgBox Err.Description
Resume Exit_cmdOpenForm_Click
End Sub
John Ruff - The Eternal Optimist J
Always looking for Contract Opportunities
9306 Farwest Dr SW
Lakewood, WA 98498
papparuff@c...
-----Original Message-----
From: rwalker@w... [mailto:rwalker@w...]
Sent: Friday, February 22, 2002 5:47 PM
To: Access
Subject: [access] Passing Data between forms
I want to enter data on one form(Main Form), then open another form with
the same information that was entered on the first form(Main Form). Can
anyone tell me how I should go about doing this? So far, what I'm doing
is not working.
Thanks
Message #3 by "John Ruff" <papparuff@c...> on Fri, 22 Feb 2002 10:47:38 -0800
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0019_01C1BB8E.58E50A00
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Look at my post for RE: Passing Data between forms. You can use the
same code except for one change:
change
DoCmd.OpenForm stDocName, , , stLinkCriteria
to
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
John Ruff - The Eternal Optimist J
Always looking for Contract Opportunities
9306 Farwest Dr SW
Lakewood, WA 98498
papparuff@c...
-----Original Message-----
From: John Ruff [mailto:papparuff@c...]
Sent: Friday, February 22, 2002 10:42 AM
To: Access
Subject: [access] RE: Passing Data between forms
Here you go
Private Sub cmdOpenForm_Click()
On Error GoTo Err_cmdOpenForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
' if the field being searched is a text field,
' use this code
stLinkCriteria = "[CustomerID]='" & cboCustomer & "'"
' if the field being searched is a numeric field,
' use this code
stLinkCriteria = "[CustomerID]=" & cboCustomer
stDocName = "frmOrders"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenForm_Click:
Exit Sub
Err_cmdOpenForm_Click:
MsgBox Err.Description
Resume Exit_cmdOpenForm_Click
End Sub
John Ruff - The Eternal Optimist J
Always looking for Contract Opportunities
9306 Farwest Dr SW
Lakewood, WA 98498
papparuff@c...
-----Original Message-----
From: rwalker@w... [mailto:rwalker@w...]
Sent: Friday, February 22, 2002 5:47 PM
To: Access
Subject: [access] Passing Data between forms
I want to enter data on one form(Main Form), then open another form with
the same information that was entered on the first form(Main Form). Can
anyone tell me how I should go about doing this? So far, what I'm doing
is not working.
Thanks
Message #4 by "Walker, Renee C." <rwalker@w...> on Fri, 22 Feb 2002 13:53:41 -0600
|
|
Okay, thanks John.
-----Original Message-----
From: John Ruff [mailto:papparuff@c...]
Sent: Friday, February 22, 2002 12:48 PM
To: Access
Subject: [access] RE: Passing Data between forms
Look at my post for RE: Passing Data between forms. You can use the same
code except for one change:
change
DoCmd.OpenForm stDocName, , , stLinkCriteria
to
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
John Ruff - The Eternal Optimist J
Always looking for Contract Opportunities
9306 Farwest Dr SW
Lakewood, WA 98498
papparuff@c...
-----Original Message-----
From: John Ruff [mailto:papparuff@c...]
Sent: Friday, February 22, 2002 10:42 AM
To: Access
Subject: [access] RE: Passing Data between forms
Here you go
Private Sub cmdOpenForm_Click()
On Error GoTo Err_cmdOpenForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
' if the field being searched is a text field,
' use this code
stLinkCriteria = "[CustomerID]='" & cboCustomer & "'"
' if the field being searched is a numeric field,
' use this code
stLinkCriteria = "[CustomerID]=" & cboCustomer
stDocName = "frmOrders"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenForm_Click:
Exit Sub
Err_cmdOpenForm_Click:
MsgBox Err.Description
Resume Exit_cmdOpenForm_Click
End Sub
John Ruff - The Eternal Optimist J
Always looking for Contract Opportunities
9306 Farwest Dr SW
Lakewood, WA 98498
papparuff@c...
-----Original Message-----
From: rwalker@w... [ mailto:rwalker@w... <mailto:rwalker@w...> ]
Sent: Friday, February 22, 2002 5:47 PM
To: Access
Subject: [access] Passing Data between forms
I want to enter data on one form(Main Form), then open another form with
the same information that was entered on the first form(Main Form). Can
anyone tell me how I should go about doing this? So far, what I'm doing
is not working.
Thanks
---
Change your mail options at http://p2p.wrox.com/manager.asp
<http://p2p.wrox.com/manager.asp> or
|
|
 |