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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import delimited text file - allow user to change order of fields 1

Status
Not open for further replies.

MikeK

Technical User
Aug 26, 2000
1
0
0
GB
I am attempting to set up a form that imports a delimited text file, allows the user to drag and drop the fields to any order, then automatically produces a query on the fly (with the fields in that order) this will be exported to a new text file.

I have designed the basics of the form, which imports the file into a table, simply Field1 - Field2 etc. (8 fields in all)

My problem is in generating the query ...

When user is finished, I currently have 8 hidden text fields containing the new field order.

So the original Field1 - Field2 - Field3 etc.
Could now be .. Field7 - Field4 - Field1

So I need to build a query on the fly, that refers to the field reference 'contained in [text1]' etc.

ie. Not select Mytable.Field1
but ... select Mytable.'Whatever field is in text1'

Or is there another way ?



 
did you get any where with this? [sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
 
The thread at
(Running A Query that picks different Fields according to a Form in the Queries & SQL forum) deals with building a query from a user specified fields.

If you need any help amending the function that builds the query, or how to apply the query once you've built it, then let me know.
[sig]<p>Keith C Taylor<br><a href=mailto:TekTips@kctaylor.co.uk>TekTips@kctaylor.co.uk</a><br><a href= Information Gardener</a><br>The C stands for Computer![/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top