Problem in unbound forms?

  • Thread starter Thread starter GVaught
  • Start date Start date
G

GVaught

Are you setting the record source, which would be the table or query used?
If you add anything to the ControlSource, it then becomes a bound field.
 
In any standard module, you can define your function like this:

Public Function EngineerLoggedOn()
EngineerLoggedOn=DLookup("Naam","Engineer","WBPID='" & CurrentUser() &
"'")
End Function

Use this in any query, or display it on any form by making it the
controlsource of a textbox.

Note that if you think CurrentUser could contain an apostrophe, you'll need
to refine this definition.

HTH
= Turtle
 
MacDermot was a post off. His response applies to 'Declare New Function'

To answer remove any statements from the controlsource area and set your
recordsource to the table or query you need to use. The textbox should not
have anything in the controlsource. Once you place something here it becomes
a bound column.
 
I would wait for 12 months before I respond to the O.P. so Turtle is quite
generous in responding ...
 
Henro,
Your clock is off by a year.

I (and many other people) refuse to answer questions from people who try to
jump to the top of the list.

Please fix your clock.
 
I cannot make any unbound forms.
I make f.e. a new form in the Design View. I add a Textfield en using the
Controlsource I add a field from whatever Query or Table.
It will not show the information I am looking for. I tried using DlookUP but
DLookup also refuses to show anything.
Where am I going wrong?

TIA Henro
 
I have this query which always shows only one result:

SELECT Engineer.Naam, Engineer.WBPID
FROM Engineer
WHERE (((Engineer.WBPID)=CurrentUser()));

I want that result to be displayed on different forms AND I would like to
define it as a function (f.e. EngineerLoggedOn ()) so that I can use it as a
criterium in diverse query's.

Any idea how to do this?

TIA(!) Henro
 
Back
Top