For Allen Browne (Argent)

  • Thread starter Thread starter Allen Browne
  • Start date Start date
A

Allen Browne

No: I'm not seeing that.

Created your function.
Set a combo's RowSource to the function.

Nothing happened until I opened the form in Form view (and then only when I
dropped the combo down.)
 
Dear Allen

I Send A Mesage Before Telling You That The Code is Executing At The Design
Time So I Specifically Get The Problem Which Is

IN A Module But This Function
Function MyBol(XX as integer) As Boolean
Msgbox "Hi"
Debug.print "Print Me"
End Function

And In The Rowsource For THe Combo Box In Any Table Use The Code

Select iif(MyBol(1) = true,Field1,Field2) From TableName Where ...

You Will Find That The Code Will Be Executed When You Click Save From The
Form In Design View

Thank You Allen
I Hope You can Help Me
Thanks A Lot
 
Dear Allen

I Work With Access XP (Office XP) So I Create A Function In A Module
Returned Boolean Value Just Like

Function MyBol(XX As Integer) As Boolean
if xx = 1 then MyBol = True
MsgBox "Any Thing"
End Function

And The Row Source Of The Combo Box Is (Table Or Query) With The Following
Select Statement
Select IIF(MyBol(1),[Field1Name],[Field2Name]) From TableName Where ...

And I Swear That The Message Box Appears When I Save Any Changes To The Form
Design And Save It

Please Try This On Access XP This Problem Hanging Me Because Each Time I
Save What I Done It Takes A Lot Of Time

Please Be Patient And Help Me
Thank You Allen
 
I'm not doubting you, but I think there has to be some other factor here.

By way of example, if you use a crosstab query as the RecordSource for a
form or report, Access will run the query to learn what the field names are.
It has to do this even when you open the form in design view. If the
crosstab had a function call, you would then see the function executing when
you opened the form in design view.

There has to some other factor like that, specific to your form, which does
not apply in my case so I don't see it.
 
Back
Top