My form is opened with an on click event:
DoCmd.OpenForm "FrmEnhancedEnrolment", , , , acFormEdit
MyValue = InputBox(Message, Title, Default, 100, 100)
The msgbox then gets the value of the record I wish to find(at present the form is at the next new number despite opening on edit)
I am not sure what method to use to get it to open at the selected myValue.
I am searching on studId PK so I guess I have to convert the string from input box to a long.
help would be much appreciated.
I tried this also:
DoCmd.OpenForm "FrmEnhancedEnrolment", , , "[studentid]='myvalue'", acFormEdit
but it reports docmd action cancelled.
regards
DoCmd.OpenForm "FrmEnhancedEnrolment", , , , acFormEdit
MyValue = InputBox(Message, Title, Default, 100, 100)
The msgbox then gets the value of the record I wish to find(at present the form is at the next new number despite opening on edit)
I am not sure what method to use to get it to open at the selected myValue.
I am searching on studId PK so I guess I have to convert the string from input box to a long.
help would be much appreciated.
I tried this also:
DoCmd.OpenForm "FrmEnhancedEnrolment", , , "[studentid]='myvalue'", acFormEdit
but it reports docmd action cancelled.
regards
Last edited: