New user help with Access update query

  • Thread starter Thread starter Jeff Williams
  • Start date Start date
J

Jeff Williams

I have 2 columns in my table

col1 and col2

Col1 Col2
11110 CR001795
CR001795

11195 CR001651
CR001651

The update query must update blank values in col1 where the value in col2
is the same each group of data is separated by a blank row (no value in col1
or col2).


result should be

Col1 Col2
11110 CR001795
11110 CR001795

11195 CR001651
11195 CR001651

How can I do this with an update query.

The update query must update blonk values in col1 where the value in col2
is the same each group of data is seperated by a blank row (no value in col1
or col2).
 
I don't think you can do this with an update query. Hopefully, there is only
1 value in column 1 for each unique value in column 2. If so, you can walk a
recordset looking for each unique value in column 2, then grabbing the first
non null value in column 1 and setting all values in column 1 = to that
value for each like value in column 2. I think it might take a few hours to
code that successfully. Make sure you have plenty of backup copies of that
table <g>
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top