Page 2 of 2

Re: Default value in subform

Posted: Sat Dec 29, 2018 5:40 pm
by kev1n
To sort the rows, you add the ORDER BY clause in the SELECT statement.

Re: Default value in subform

Posted: Sat Dec 29, 2018 6:31 pm
by Janusz
On one form lets say Form_1 I have a button with run command to open other form lets say Form_2 to enter a new record on it.
To have blank form I use - non existing value in the search field. And later I have to choose manually the reference with the "Lookup".

so the question - how to set on Form_2 in just in one field a value taken from the Form_1.

(So after Button press on Form_1 to have following sequence -> read value from Object_A on Form_1 -> Open Form_2 -> set value on Form_2 / Object_X = Object_A )

Re: Default value in subform

Posted: Sun Dec 30, 2018 10:09 am
by kev1n
Janusz wrote:On one form lets say Form_1 I have a button with run command to open other form lets say Form_2 to enter a new record on it.
To have blank form I use - non existing value in the search field. And later I have to choose manually the reference with the "Lookup".

so the question - how to set on Form_2 in just in one field a value taken from the Form_1.

(So after Button press on Form_1 to have following sequence -> read value from Object_A on Form_1 -> Open Form_2 -> set value on Form_2 / Object_X = Object_A )
Is this question related to "Default value in subform"? It's better to create a new topic instead of asking different kind of questions in one thread.

Re: Default value in subform

Posted: Tue Sep 01, 2020 7:07 pm
by kev1n
Janusz wrote:And one more question for subforms. What would be the best way to define default sorting order by a specific column?
Add an ORDER BY clause in the SQL.

Re: Default value in subform

Posted: Fri Nov 06, 2020 6:21 pm
by treed
I'm trying to do this too. Where I'm stuck is that there is no SQL I can find. There is a place to put in a table name. I tried the name of a saved SQL query and just got blank records. So where is this SQL that can be edited in a subform???

Tom

Re: Default value in subform

Posted: Fri Nov 06, 2020 9:22 pm
by Janusz
Tom,
So where is this SQL that can be edited in a subform???
When you open subform object then in the Subform Tab you will have Form Lookup - where the first field is Form_id and the second is the form name.
Copy the first field (form id).
Next go to the nuHome choose Form tab and find the (sub)form with id copied just before.
When you open it you will see just typical form with sql and other options.

Janusz

Re: Default value in subform

Posted: Sat Nov 07, 2020 8:12 am
by kev1n
With Clicks: Click 3 dots of the subform, click "Form Properties", select "Browse"