Open a form to a specific record

isv_2004

Registered User.
Local time
Today, 12:28
Joined
Oct 19, 2004
Messages
14
Help ! I hope this is not too confusing.

From the "Assets Form", by clicking a button, I need to open the "Shipping Form" to the record that has same ICS# value.

Field names:
ICS#

Forms:
Assets
Shipping

_______________________
|
| Assets Form
|
| System: _Raven_
| Shipped to: _ICS#_
| _____________________
| |_Open_Shipping Form_| <-- Button
|

______________________
|
| Shipping Form
|
| ICS# _2020_
|
| Address: _ 1020 Sam St_
|
|
 
Last edited:
Hi
You give field names but really you need to give textbox names since Me. references a textbox not a field. For sake of argument I will assume they are the same.
You are going to want something like as the code behind a command button on the assets form. I have also assumed ICS# is numeric. If it is text you will need to play around with the inverted commas and ampersands to get it to work.

Code:
Dim stDocName as string
Dim stLinkCriteria as string

stDocName = "ShippingForm"
stLinkCriteria = "[ICS#] = " & Me.ICS# & ""
    DoCmd.OpenForm stDocName, , , stLinkCriteria
That should open up the shipping form linking on the value in the ICS# textbox on the assets form.
HTH and good luck
 
Malcy,

Thank you very much! It worked perfectly :)

isv_2004
 
Cool.
Hope the app develops as you want
 

Users who are viewing this thread

Back
Top Bottom