Results 1 to 2 of 2
2004-04-28, 17:08 #1
- Join Date
- Apr 2003
- Calgary, Alberta
- Thanked 0 Times in 0 Posts
Open Form in Edit Mode (Access 2000)
I have a shipment form called "FRM_IncomingShipments" which has the record source coming from a table called "IncomingShipments". This form is used to enter new incoming shipments. I also have a form that shows all the incomplete incoming shipments. On that form, once a user selects the shipment they want to open, I would like to open the form "FRM_IncomingShipments" and have the data populate itself. I can get the form "FRM_IncomingShipments" open in acEditMode, but I cannot get the information to be populated into the form. How can I can the information into the form?
2004-04-28, 19:23 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Open Form in Edit Mode (Access 2000)
Does your IncomingShipments table have a primary key, say a field ShipmentID? If so, you can use code like this to open the form:
DoCmd.OpenForm FormName:="FRM_IncomingShipments", WhereCondition:="ShipmentID = " & Me.ShipmentID, DataMode:=acFormEdit
This assumes that ShipmentID is numeric. If it is a text field, use ..., WhereCondition:="ShipmentID = " & Chr(34) & Me.ShipmentID & Chr(34), ... instead.