checkbox in form to control checkboxes in subform

L

LVer

Hi,

I am tring to create a checkbox (OrdersReceived) in a form that when checked
automaticly updates a checkbox (OrderReceived) for each record in the
underlying subform. I created the folowing after-update event

Dim OrderReceived As Control
Dim OrdersReceived As Control
For Each OrderReceived In Me.CompanyOrderssubform
OrderReceived = CompanyOrderForm.OrdersReceived.Value
Next OrderReceived

Everytime I try to use it it gives an error.

Any advise would be welcome,

LVer
 
M

Marshall Barton

LVer said:
I am tring to create a checkbox (OrdersReceived) in a form that when checked
automaticly updates a checkbox (OrderReceived) for each record in the
underlying subform. I created the folowing after-update event

Dim OrderReceived As Control
Dim OrdersReceived As Control
For Each OrderReceived In Me.CompanyOrderssubform
OrderReceived = CompanyOrderForm.OrdersReceived.Value
Next OrderReceived


You need to update each record in the subform's recordset:

With Me.CompanyOrderssubform.Form.Recordset
.MoveFirst
Do Until .EOF
!OrderReceived = Me.OrdersReceived
.MoveNext
Loop
End With
 
L

LVer

I still get the same error:
"A problem occured while the "DBase" was communicating with the OLE server
or ActiveX control.
 
M

Marshall Barton

LVer said:
I still get the same error:
"A problem occured while the "DBase" was communicating with the OLE server
or ActiveX control.


That seems to indicate a problem with the dBase database,
the ODBC driver or your connection string. I can't help
with those issues and you would be better off asking about
that in a forum more closely related to your problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top