Need help with a strange problem

A

Alain

Hi to all,

I am encountering a very strange problem and I need to fix it.

I am using the Access auto wizard to insert a command button on a form to
open a form ans show a specific recordset. after it is done with matching
the proper field for the criteria, I click on the button and nothing
hapenned at all, I even insert a breask in the code to see where the error
might occur but no success, it seem that the code is ignored completely
since I cannot get the code to stop at the break,
Even more I do not get an error message at all

I have tried the same process on a new form and it work perfectly, same code
same criteria, also I have notice something strange, the field I use for the
criteria is not bring identify properly meaning when you insert a field on
a form, the name of that control should be the same as the field name but in
my case the name is text517 or else since I have tried multiple time to
delete the field from the form, save the form, close it, re-opened it and
insert the same field again and again the control name is not the field
name at all but text518 this time. I have check all control on my form to
see if the control might be already there but no it is not ...

So my question is simple: what can cause this situation ?? why a simple
control to open a forma is not working from the wizzard ??

I am going nuts here and I would like to understand whant can cause this
problem, no matter what I do nothing is working

TIA

Alain
 
G

Guest

Alain,

I'm not sure if this is the root of your problem or not, but are you sure
that your command button is properly tied to the field name? I can see that
you are concerned about the field name being automatically set to text518 or
whatever, but that is just access tracking the number of fields in your
forms. I don't believe you can straight out copy a command without having to
edit something. I'm still learning this myself, but I ran into the same issue
once.

Also, try posting your code, it may be a simple typo that you are missing.

cheers
 
A

Alain

Thanks Paul,

After deleting all controls on the form one by one I finally find the
problem, the control I needed to use as the critera was there but so small I
was very lucky to find it (BTW this db was create by another programmer). It
was set at the top left corner next to the border, After deleting that
control, I re-insert it on the form in a more visible position this time,
ran the wizard and boom everything work just fine.

FYI when you set a control on your form, the control is always the name of
your field, if you set that control twice or multiple time, then Access will
name it TextWhatever, I might be wrong but have been working for the last
year heavilly on Access and learn quite a lot and the hard way too so I will
still learn until I become a MVP in a few years I hope...:))))


Alain
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top