proffittware
asked on
change a form from edit to read-only after entering data in a combo box
I have created a form that is read-only with loaded/opened. I have created a combo box that allows the user to select a record in the master database and then fills in the form.
I have been successful in getting the combo box to allow entry with allowedits=true in KEYPRESS, the form is filled in, but once I hit enter even though I have put allowedits=false in ON CLICK, ON ENTER.
Can this be done ? Have I forgotten something ?
Thanks...ProffittWare
I have been successful in getting the combo box to allow entry with allowedits=true in KEYPRESS, the form is filled in, but once I hit enter even though I have put allowedits=false in ON CLICK, ON ENTER.
Can this be done ? Have I forgotten something ?
Thanks...ProffittWare
ASKER
Yes, I did the subform initially and it worked they way I wanted.
I was just trying to do a one screen "Find/Search", then data entry or read-only. I have buttons ADD, EDIT, SAVE that change the read-only/data entry back and forth. But the "FIND" combo box is a problem. Do you think this can be done?
ProffittWare
I was just trying to do a one screen "Find/Search", then data entry or read-only. I have buttons ADD, EDIT, SAVE that change the read-only/data entry back and forth. But the "FIND" combo box is a problem. Do you think this can be done?
ProffittWare
ASKER
I tried adding to my AfterUpdate:
.Allowedits=false
In my AfterUpdate event I put the above statment - after the Private statement- tested and then before the End Sub- tested and they both did not work.
I had tried this before asking for help, maybe my AfterUpdate event has a problem?
Private Sub Text1_AfterUpdate()
Me.RecordsetClone.FindFirs t "[SSN]=" & "'" & Me![Text1] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
.Allowedits=false
In my AfterUpdate event I put the above statment - after the Private statement- tested and then before the End Sub- tested and they both did not work.
I had tried this before asking for help, maybe my AfterUpdate event has a problem?
Private Sub Text1_AfterUpdate()
Me.RecordsetClone.FindFirs
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry I did not get back with you sooner...had Internet issues.
Thanks for your input !!!
Thanks for your input !!!
one way I have done this in the past is to put the "Find" combobox in a seperate subform that is not bound and has AllowEdits= true and leave the main form AllowEdits = False. You only need to adjust your FindFirst code to reference me.Parent...
If you want to go this way please post your code and we can fix it up :-)
Steve