Thanks for trying to help. Have tried all suggested methods but have still not got it right. Can close report with Esc if I do not press the magnifier. As soon as I press the magnifier, and press it again to reduce size to original, Esc does not work. But If I then click off the report (in the...
Hi In 2003 this functionality worked fine, but not in 2007. Want to close a report by using Esc key. In 2007 can get it to partially work by making report modal. So I double click a form control and the report opens. Then press Esc and report closes. But if I use the magnifier to enlarge the...
Thanks for the offer Bob, really appreciate that. Unfortunately I cant send the db, realize I have not given enough for you to help. I will speak to our IT folk tomorrow see if they can see what I`m doing wrong. Again, thanks
Thanks Bob, I know I shouldnt be using OnChange in general and I wont in future but it`s too far gone now. And it does work because I have disabled the keyboard so choosing a drop down value is a change, ie in this scenario the OnChange does work. Have multiple OnChange events happening. There...
Hi Folks Sorry for the title but dont know how to better describe it. Have the weirdest thing happening. Db has some 7300 records, most of the fields are in one table. All of the records were entered via a form. Form had code, enabling and disabling controls and adding and deleting values...
Took me for ages to figure it out but seems my if/else statement was not correct.
For this situation think I will leave it "". The LockRecord field is visible on the form but is locked so user cannot enter anything, can only double-click. The yes and "" values are code driven and are not used...
ok think i've got it, syntax was wrong.
thanks for trying to help.
Private Sub LockRecord_DblClick(Cancel As Integer)
If Me.LockRecord.Value = "Yes" Then
Me.LockRecord.Value = " "
ElseIf Me.LockRecord.Value = " " Then
Me.LockRecord.Value = "Yes"
End If
Me.Dirty = False
End Sub
Now here's the strange thing. Take this code
If Me.LockRecord.Value = "Yes" Then
Me.LockRecord.Value = " "
End If
If Me.LockRecord.Value = " " Then
Me.LockRecord.Value = "Yes"
End If
If I change the spacing between the quotes ("" to " ") then the code runs one way, for example can replace all...
Hi
Still have problems with this code, although it does work intermittently.
The text control "LockRecord" is on a subform (datasheet). On my test db this form has some 30 records. Sometimes a double click will insert a "yes" into an empty cell, other times not. Also, sometimes a double click...
Hi Still have problems with this code, although it does work intermittently. The text control "LockRecord" is on a subform (datasheet). On my test db this form has some 30 records. Sometimes a double click will insert a "yes" into an empty cell, other times not. Also, sometimes a double click...
Thanks for this feedback; double click has no effect now, nothing happennig.
I will take another look tonight and try figure it out; will post again.
Thanks
Hi
Using Access 2003.
Have a subform with a text control called LockRecord. On double click am trying to populate the control with "yes", if the field is empty, and convserely delete the "yes" if the field has a yes value. Have placed the following code in the control's DblClick event, but...