open form from another form

kobiashi

Registered User.
Local time
Today, 16:28
Joined
May 11, 2018
Messages
258
hi

im trying to open a form from another form, and select the same id

so first form is bound to a query

vehicle_ID
VehicleType
DateCreated

and the second is bound to a query with the field Vehicle_ID

what i want to do is open another from where the field displays the vehicle_ID

i did try

Code:
Private Sub btnAddBogie_Click()
dim VehicleID as Integer

VehicleID = Me.txtVehicleID (this is the field name on the first form)

DoCmd.Openform "Form_ENG_RS_Vehicles_Bogie_NewEntry" , WhereCondition:="VehicleID=" & me!Vehicle_ID

but it cannot find the value of VehicleID
 
You either use VehicleID or Me.txtVehicleID

There is no me!Vehicle_ID
 

Users who are viewing this thread

Back
Top Bottom