have the fields update on there own without the need for a button
Sub RefreshForm(oEvent as object)
oEvent.Source.Parent.getByName("SubFormReplaces").reload
End Sub 'Refresh Form
sub ListBoxChanged (oEv as object)
dim oForm as object, oControl as object, sSubform as string
oControl = oEv.source.model
oForm = oControl.parent
oControl.commit()
oForm.updaterow
if oControl.name = "txtReplaces" then
sSubform = "SubFormReplaces"
else
sSubform = "SubFormSimilar"
endif
oForm.getbyname(sSubform).reload
end sub
if oForm.getbyname("txtItem").currentvalue = "" then exit sub 'if Item is empty then exit
if oForm.isNew then
oForm.insertRow
end if
Users browsing this forum: No registered users and 1 guest