Well I would have said the Me. would be the control, and the other the field?![]()
Well I would have said the Me. would be the control, and the other the field?![]()
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Yes that is correct,
Me. refers to a control on the form and
Me! refers to a field in the forms record source, as is the case here.
Only if they are called the same thing.
Me!YourControlName will still find a control if one exists and there isn't a field of the same name. You won't get intellisense, as it's not pre-compiled.
I think it's a dangerous/ambiguous way to refer to things personally.
I will go back to my original assertion that they provide a recordset clone for really good reasons, and as previously mentioned by Moke Using the Form_ prefix is generally used when instantiating a form instance. set frm = New Form_SomeForm.
This can have some undesired side effects.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
I rarely, if ever, use a bang.
Yes, I am adjusting the recordset, but from my testing, the record set is updated and the syntax [Form_Bird List].Recordset.Fields("TaxonomySequence") gives the correct value, but Me!TaxonomySequence.Value gives another, which does not seem to be the value in the current record.
Which recordset are you updating? And how?
How are you determining the value of the current record?
It just seems odd to me to use findfirst in a form without using bookmark .
If this helped, please click the star * at the bottom left and add to my reputation- Thanks
There is only one Recordset and it all seems to work, so not a problem.
On the issue of not using the [Form_<form name>] terminolgy, I have done some experimenting, I can't see the benefit.
Firstly, using the Forms("<form name>") terminology only works if the form is open (I think I am correct in saying this). This is not normally a problem when running the code, but in testing a form stand alone, it is useful to automatically instantiate a copy of the missing form.
Secondly, it is more complicated to refer to items on subforms as you have to refer to the main form and then the subform control. Same is true, if running functions that are in the subform code from another module. I did manage to get this to work though.
Thirdly I have the following code : Forms("Taxonomy").PopulateTaxonomyTree (this is code in the Taxonomy form)
If I right click "Definition" on PopulateTaxonomyTree in the VB editor, it says "Item under cursor is not recognized"
However, if I use my original terminology : [Form_Taxonomy].PopulateTaxonomyTree
and do the same thing, the VB editor goes straight to the code in the Taxonomy form.
I think I'll stick to using [Form_<form name>] when referring to forms.