Hello,
I have a continuous form which has a textbox whose control source is set to a function which returns a number (more specifically, a string: varNum + ".")
This is so each form appears to have a numeric label. This is working... the labels are correct and it looks nice...
Turns out I could get it to work by FIRST moving OFF of the control, and then moving back to the control. There must be some weird data conflict going on in the Access background??
works:
private sub txtData1_Event()
' . . .
txtData2.setFocus
txtData1.setFocus
' . ...
Hello,
There seem to be a few places in MSAccess VBA where setFocus(), applied to a control, just won't work like you'd expect it should.
For instance in BeforeUpdate(), I actually get a VBA error stating that I need "to save the control" before using this method.
in...
hello,
for some reason when i set a filter in code it's creating a new record. any idea why?????
Me.Filter = "PK_ID = " & lPKId
Me.FilterOn = True
The filter works, but a new record is always created, which i do not want. i'm stumped!
thank you so much for your answer. i think because of the complexities involved (ex. you have to open the form in design view, it seems really tricky to get a new control to respond to an event, etc. etc.) VBA control creation isn't really appropriate at run time. But at least now I have a start...
Could someone confirm what I think is the case... that dynamic control creation is NOT available in VBA (specifically, MS Access)?
If I am wrong, and it is available, would someone be so kind as to give a simple simple example, say creating a command button at load time?
example in VB...
'...
Hello,
I have "form_current" event in a subform of a main form. For some reason, it is firing more than once in the subform. Can't see why at all. Can anyone help? Thank you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.