Update Query to filll all blanks in a column

zach9208

Board Regular
Joined
Dec 15, 2015
Messages
117
Hello all.

I have a table that I am consistently adding records to. I have that part of my database complete and working.

However, I am looking to find out the proper way to setup a new update query. I need this update query to prompt me once for a specific date, and then it fills all the blanks within one column labeled "Trade Date".

I need this to quickly update all the records that I import from excel that have not been assigned a trade. I really need a query as it can be hundreds of records in a given day.

Any ideas? Thanks in advance!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
did you try to create an update query by yourself, or at least try the query wizard? If this is one table without joins and defined relationships it should be as simple as
Code:
UPDATE tblYourTableName SET tblYourTableName.[Trade Date]=[Enter Date] WHERE tblYourTableName.[Trade Date] Is Null;
To be updated with that statement, the field has to have nothing in it, including a space.
You will probably get a prompt asking you to confirm that you are about to update n rows. Note that I did not (and NeVeR) use spaces in my made up table name.
When Access cannot process something in a sql statement that it thinks is a field or table name, it will prompt you for the value. So [Enter Date] is a parameter and the words within will become part of the prompt. That's the only time I would include spaces, and NeVeR would I use special characters except sometimes, the underscore. You might want to research reserved names and naming conventions.
 
Last edited:
Upvote 0
Thanks, Micron. This SQL code worked perfectly. I also looked into naming conventions to avoid. Thanks again for the help.
did you try to create an update query by yourself, or at least try the query wizard? If this is one table without joins and defined relationships it should be as simple as
Code:
UPDATE tblYourTableName SET tblYourTableName.[Trade Date]=[Enter Date] WHERE tblYourTableName.[Trade Date] Is Null;
To be updated with that statement, the field has to have nothing in it, including a space.
You will probably get a prompt asking you to confirm that you are about to update n rows. Note that I did not (and NeVeR) use spaces in my made up table name.
When Access cannot process something in a sql statement that it thinks is a field or table name, it will prompt you for the value. So [Enter Date] is a parameter and the words within will become part of the prompt. That's the only time I would include spaces, and NeVeR would I use special characters except sometimes, the underscore. You might want to research reserved names and naming conventions.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,004
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top