Question for Allen Browne re: FindAsUType

D

dhstein

Hi Allen,

I use your excellent FindAsUType module - thank you for that. When the
form load event occurs , the program goes through all the controls and when
the form opens, there is a value in all the fields. I'd like to force a
different initial value and I've been trying to figure out which event to use
and where to make the change, but so far with no success. If you would be so
kind as to help me that question, I would appreciate it.

David
 
A

Allen Browne

You're welcome to modify it as you wish, but I can't really do that for you.

I presume you want to set the combo's value to a different field name. You
can find the line where the combo's value is set, and then assign a
different value.

Of course, that will mess up the fact that the code (as it stands) runs on
any bound form. After you assign a different value, it won't work on other
forms.

By default, it is design to choose the first bound control in the form's Tab
Index that can be filtered.
 
D

dhstein

Allen,
I don't want to change the combo's value to a different field name - I just
want to do an update on form load so instead of the default value that is
there initially, there will be another value. I'm using the program in a
form that will do product updates. When the form loads it always shows
"Vanilla Wafers" and one of these days the user is going to modify Vanilla
wafers price by mistake. I want the first form to show "rubber duckies"
which is a product that I don't care if it gets modified. So I'm just trying
to insert in the formload event somewhere a line like "ProductSKU".Value =
2007 and then run the program findasutype so it populates the fields - just
like it does when somebody types the value. I appreciate that you don't have
time for custom coding - and that's not my request. But thanks for the
program and for taking the time to read this.
 
A

Allen Browne

Why not jump to a new record in Form_Load:
If Not Me.NewRecord Then RunCommand acCmdRecordsGotoNew

If that's not acceptable, FindFirst in the form's RecordsetClone, and set
its Bookmark.
 
D

dhstein

;-)

That's the best I could do with a smiley face. This is a little bit like
Einstein explaining relativity to a 4th grader - but I appreciate your time
and I'll try to understand and implement your instructions. Thanks.
 

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