Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

storing SQL query statements 1

Status
Not open for further replies.

Bryan - Gendev

Programmer
Jan 9, 2011
408
AU
In my Membership app I have a query form allowing the user to select a 'membership situation' which then writes the pre-prepared 'boilerplate'statement to a text box.

a button runs the SQL statement (as given in a previous posting.)

At present I write an array [50,3] as I load the form from data in the init method.

I want to take these prepared situations and SQl statements outside the form and build a maintenance form where the existing statements can be amended (within the loaded app ) and/or new ones added.

The 'membership situations' are presented in a list box so adding new ones will be catered for.

So I have 3 related items for each 'membership situation' to be stored so that they can be read in (to the array) when the form starts.

Any help appreciated.

GenDev
 
Well, put the three values in three fields of a table, change the listbox to the recordsourcetype alias or fields.

If you have a table, the maintinace form is simply a data entry and maintainance form.

I remember to recently have written several times in several places, cursor and tables are foxpros working horses not arrays. Especially if you come from PHP you would always think in arrays, as you also query into arrays there. To foxpro the equivalent is cursors.

Bye, Olaf.
 
I've created the query editing form with a 4 column grid.
The grid populates from my table but all rows contain the first record.

How do I make the grid display each record in the table please?

GenDev
 
WEll I fixed it by using the builder - I have used data type as alias instead of table.
 
The behavior of the grid you explain can be seen, if the recordsource is set to another table as the controlsource of the columns, then the grid does not scan the table it displays, resulting in repeatedly showing the current record of the table to columns are bound to.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top