I have a data entry form that will be used to enter specifics about contracts. The underlying table for the form has a field called ApprovedContractLink that has an OLE Object data type. On the form, I have a Bound Object Frame that is bound to the ApprovedContractLink field. The data entry person can click on this control to browse to the network location where the approved contract file is stored, and link that document to the table.
Everything works, meaning the link is saved to the record. The problem I am having is that the browse to file dialog box pops up twice, once when they click on the control (because I have an On Click event coded for this), a second time when the control looses focus. Why is the dialogue box coming up again when the control looses the focus?
This is my first time ever using a bound object frame like this, and I am probably missing something elementary… Any help you can offer will be greatly appreciated.
Here is the code behind the bound object frame’s On_Click event:
Pertinent (maybe) control properties are:
Control Source = ApprovedContractLink
Display Type = Icon
Update Options = Automatic
OLE Type Allowed = Linked
Everything works, meaning the link is saved to the record. The problem I am having is that the browse to file dialog box pops up twice, once when they click on the control (because I have an On Click event coded for this), a second time when the control looses focus. Why is the dialogue box coming up again when the control looses the focus?
This is my first time ever using a bound object frame like this, and I am probably missing something elementary… Any help you can offer will be greatly appreciated.
Here is the code behind the bound object frame’s On_Click event:
Code:
Private Sub bofApprovedContractLink_Click()
'bring up a browse box to allow user to link the contract to the record
bofApprovedContractLink.Action = acOLEInsertObjDlg
Me.lblApprovedClickHere.Visible = False
End Sub
Pertinent (maybe) control properties are:
Control Source = ApprovedContractLink
Display Type = Icon
Update Options = Automatic
OLE Type Allowed = Linked