form

  • Thread starter Thread starter Christian Schartner
  • Start date Start date
C

Christian Schartner

Hallo NG,

I want to change the recordsource of a formula.
Do I have to open this specific formula to change the property by vba or is
it possible with a closed formular like:

frmtest2.RecordSource ="SELECT * FROM Tablelle WHERE ...."

THANK You

Christian Schartner
Salzburg
 
You have to change it in designview of the form.

But you can also add code to the Form_Load event and have it changed
dynamically when the form opens.

- Raoul
 
Christian said:
I want to change the recordsource of a formula.
Do I have to open this specific formula to change the property by vba or is
it possible with a closed formular like:

frmtest2.RecordSource ="SELECT * FROM Tablelle WHERE ...."


What you have fine and can be used just about anywhere in a
form's module. For a report, it can only be in the report's
Open event.

The RecordSource property can be set to an SQL statement (as
you posted) or to a table or query name (e.g.
frmtest2.RecordSource = "MyQuery").
 
Back
Top