Subform Programming HELP

N

New Guy

I want to change the Link Child Fields on a subform using Code based on a
checkbox value (0,-1). Can this be done?

Select unbound Chkbox on form and have value in Link Child Fields change
FROM NumberID TO JNumberID. Any ideas or samples appreciated.
 
B

Bernie

New Guy said:
I want to change the Link Child Fields on a subform using Code based on a
checkbox value (0,-1). Can this be done?

Select unbound Chkbox on form and have value in Link Child Fields change
FROM NumberID TO JNumberID. Any ideas or samples appreciated.

Try this one:

Private Sub Trip_Click()

strmainform = Me.Form.Name
strSubformcontrol = "varform"
strControlname = "frmhistory"
strChildFields = "tabTripHeaderID"
strMasterFields = "tabTripHeaderID"
strRecordsource = "qryTrip"

Call MainFormLoaded(Me.Form.Name)

If MainFormLoad = True Then

Call displayVarform(strmainform, strSubformcontrol, strControlname,
strChildFields, strMasterFields, strRecordsource)
Call bindvarform(strmainform, strSubformcontrol)

Else

strChildFields = ""
strMasterFields = ""
strRecordsource = ""

Call displayVarform(strmainform, strSubformcontrol, strControlname,
strChildFields, strMasterFields, strRecordsource)
Call unboundvarform(strmainform, strSubformcontrol)

End If

Call CalcTotalWeight(strmainform, strSubformcontrol)

'Call varFormEdit(strMainForm, strSubformControl, strControlName, frmState)
'Forms(strMainForm)(strSubformControl).AllowAdditions = False
End Sub
 

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