ISDleftovers
Technical User
I am new to programming 'dynamic' forms in that in the past to make a form that allows me to search one group of records I would make a form, and for a second group of records a separate form, and to search both groups of records, I would create a third form.
but realising the pain this could create for me when maintaining the system myself I have opted to create one form, and disable/deactivate the fields that are not required, while opening the form.
my problem is that some of the fields have a syntax different to others, which does not want to work for me. I worked out how to disable some fields, but the other fields have an "Item" keyword in their definition, this keyword gives an error whenever I test the code.
here is my code...
frmReport.fldAccName.Enabled = False
frmReport.fldAccName.BackColor = (ColorConstants.vbBlack)
'frmReport.fldOriginCity.Item.Enabled = False
'frmReport.fldOriginCity.Item.BackColor = (ColorConstants.vbBlack)
'frmReport.fldDestinCity.Item.Enabled = False
'frmReport.fldDestinCity.Item.BackColor = (ColorConstants.vbBlack)
the lines which I have commented out are the lines which give errors when run, ordinarily an "Argument not Optional" error, if anyone knows what is causing this or even just how to stop it I would greatly appreciate your help as there quite a few controls which will end up using this method.
but realising the pain this could create for me when maintaining the system myself I have opted to create one form, and disable/deactivate the fields that are not required, while opening the form.
my problem is that some of the fields have a syntax different to others, which does not want to work for me. I worked out how to disable some fields, but the other fields have an "Item" keyword in their definition, this keyword gives an error whenever I test the code.
here is my code...
frmReport.fldAccName.Enabled = False
frmReport.fldAccName.BackColor = (ColorConstants.vbBlack)
'frmReport.fldOriginCity.Item.Enabled = False
'frmReport.fldOriginCity.Item.BackColor = (ColorConstants.vbBlack)
'frmReport.fldDestinCity.Item.Enabled = False
'frmReport.fldDestinCity.Item.BackColor = (ColorConstants.vbBlack)
the lines which I have commented out are the lines which give errors when run, ordinarily an "Argument not Optional" error, if anyone knows what is causing this or even just how to stop it I would greatly appreciate your help as there quite a few controls which will end up using this method.