Update parameter query (1 Viewer)

Pippa1

Registered User.
Local time
Today, 01:17
Joined
Oct 2, 2017
Messages
30
Hi everyone,

I want to do something which sounds simple but I can't make it work (story of my life with ACCESS). In my database I have individuals participating in a research study. They each have an individual ID number.

Three are 5 relevant fields to what I am trying to do:
Timepoint (T0,T1,T2 or T3)
Group (Any number)
Planned pack date
Planned Recall 1 date
Planned Recall 2 date

I want to manually update the timepoint and group for a number of individuals.

I then want to tell ACCESS that for everyone who has a timepoint of X and a group of Y their planned pack date should be A, their planned recall 1 date should be B and their planned recall 2 date should be C.

I thought I should be able to do this in an update query with parameters on each field. So the user entered the information for all 5 fields and this updated the planned dates. I entered the parameters e.g. [enter the timepoint] into the criteria row for timepoint and group and the update row for the planned dates.

However this doesn't work. Was this the wrong approach?

Thanks in advance for any guidance you can give me.
 

Minty

AWF VIP
Local time
Today, 09:17
Joined
Jul 26, 2013
Messages
10,368
What is the SQL of the query you tried, and what didn't work ?
What was the error or wrong result?
 

Pippa1

Registered User.
Local time
Today, 01:17
Joined
Oct 2, 2017
Messages
30
UPDATE Assessments SET Assessments.[Planned pack send date] = [Enter the planned pack send date], Assessments.[Recall 1 Expected date and time] = [Enter the planned Recall 1 date], Assessments.[Recall 2 Expected date and time] = [Enter the planned Recall 2 date]
WHERE (((Assessments.Timepoint)=[Enter the timepoint]) AND ((Assessments.Group)=[Enter the Group number]));


It says 0 rows to update.


Thanks
 

Minty

AWF VIP
Local time
Today, 09:17
Joined
Jul 26, 2013
Messages
10,368
Okay - take all the parameters out and hard code some of the values you think should return results and save it as a select query - see how many rows you get.

Moving this forwards, I would make a form to enter those values and restrict them to possible available values where possible, to prevent errors. You can put the form references into the query as the parameters once you get it working.
 

Users who are viewing this thread

Top Bottom