User Profile
Collapse
-
Yes the textbox.requery does display the value. Thanks. -
If I omit the last line: txtFileName.Tex t = "some value", then the textbox does receive focus.
One time I stopped execution right after the textBox.SetFocu s. All the properties had a value of :Cannot access the property of a control that does not have focus (not exactly this message but very close), with one exception, the value property had a value and I was able to display it.Leave a comment:
-
If I omit the last line: txtFileName.Tex t = "some value", then I avoid the error but don`t get the textbox filled with a value.
I changed txtFileName.Tex t to txtFileName.Val ue, and this works but the textbox shows as empty instead of the text I want.
I did some investigating and found that the problem starts when I delete all the records from the table which is the record source for the form using:
...Leave a comment:
-
This code was working until I added a couple of queries and changed some code in a different function. I don`t get it.Leave a comment:
-
SetFocus does not work in Access form
I have an unbound field on a form. In the onClick event I have code to populate a text field. I first setFocus to it and enable it. Both of these actions work. But when my code reaches the the line whete I set the textfieldname.t ext to a value, I get an error: You can`t reference a property or method unless the control has focus.
My code is:
...Code:txtFileName.Enabled = True txtFileName.Visible = True txtFileName.SetFocus
No activity results to display
Show More
Leave a comment: