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

Compare Column Headings to Saved Data

Status
Not open for further replies.

MacroAlan

Programmer
Dec 4, 2006
134
US
In our application, we save the scheme of the headings when a file is copied in for possible later re-use. That part is working splendidly.

Now I am opening a new file and want to compare the headings on this file to those that were saved. I find the exact row with a DLookUp.

Code:
ScemNum = DLookup("SchemaID", "Schema", "SchemaName=" _
   & chr(34) & cboChooseSchema & chr(34))
And the SQL to get the saved headings
Code:
SELECT Schema.SchemaID, Schema.SchemaName, Schema.MapTo_Description, Schema.MapTo_Category, Schema.MapTo_Family, Schema.MapTo_Name, Schema.MapTo_Publisher, Schema.MapTo_Version, Schema.MapTo_FileName, Schema.MapTo_AssetID
FROM [Schema]
WHERE (((Schema.SchemaID)=89));
89 is the number derived in ScemName.

Do I need afunction, SQL, RecordSet? What? Am I asking for the impossible? A code starter would help.
[smurf]

Alan

It is easier to apologize than ask permission!
 
you could either open 2 recordsets and start comparing each value in each field between the 2 recordsets

or

you could just concatenate all the fields together into 2 big strings and compare those strings...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top