Skip to content
Advertisement

My update query in MS Access doesn’t seem to do anything at all

I’ve made a tool which lets users record information that is relevant to information pulled from a rota which is updated by someone else on an excel spreadsheet. In Access I’ve made a link to the data and want to use an update query to update existing information daily due to changes being made on the rota. Information like Session time, volume of cases and locations. The code for the query is the following.

UPDATE MECOutPut
INNER JOIN [SB Export] 
ON (MECOutPut.[Schedule Date] = [SB Export].[Schedule Date]) 
AND (MECOutPut.PRN = [SB Export].PRN) 
SET MECOutPut.[AM Session] = [SB Export].[Session AM], 
MECOutPut.[AM Volume] = [SB Export].[Volume], 
MECOutPut.[PM Session] = [SB Export].[Session PM], 
MECOutPut.[PM Volume] = [SB Export].[Session PM], 
MECOutPut.MECName = [SB Export].[MEC Name], 
MECOutPut.MECName1 = [SB Export].[MEC Name1]
WHERE (((MECOutPut.[Schedule Date])=[Forms]![frmMain]![txtDate])); 

This is supposed to update the variable information from the rota export based on the date that is selected in the form. However when running it in datasheet form it pulls the relevant dates but keeps the old data.

Have I done something wrong or do I just need to rebuild?

Thanks

Advertisement

Answer

Okay I feel silly, I worked it out,

The data type was set to number at a glance however one was set to long number the other was set to double.

When I changed them to match the source data it worked instantly.

Thank you and apologies for wasting any time.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement