I have 2 problems with my DB I have been trying to resolve.
Problem 1: I have a form (frmEdit) that has a combo box (cmbCDC2) on it. I have the NotInList property set to open a new form (frmAddInmate) to add the new data. I have set a Public boolean variable (flgNil). When frmAddInmate is opened, the value is set to False. If data is added, then flgNil is set to true and the form closes. The problem is that when the program returns to frmEdit flgNil is always False. For some reason the variable is not working like I want it to.
Problem 2: On frmEdit I have a routine to check if data has been added (flgNil = true). The routine isn't working properly. What I want to do is to return to the form and have cmbCDC2 populated with the new data (requery?) and with the data entered as the current item, then the focus set to txtIncidentDate and the current record set to the criteria based on the form (cmbLogNum and cmbCDC2)
I hope I made this clear. Thanks in advance for the help.
Problem 1: I have a form (frmEdit) that has a combo box (cmbCDC2) on it. I have the NotInList property set to open a new form (frmAddInmate) to add the new data. I have set a Public boolean variable (flgNil). When frmAddInmate is opened, the value is set to False. If data is added, then flgNil is set to true and the form closes. The problem is that when the program returns to frmEdit flgNil is always False. For some reason the variable is not working like I want it to.
Problem 2: On frmEdit I have a routine to check if data has been added (flgNil = true). The routine isn't working properly. What I want to do is to return to the form and have cmbCDC2 populated with the new data (requery?) and with the data entered as the current item, then the focus set to txtIncidentDate and the current record set to the criteria based on the form (cmbLogNum and cmbCDC2)
I hope I made this clear. Thanks in advance for the help.
Attachments
Last edited: