Thank you. But still it displays as [Afternoon, Evening, Morning, Night]. I put the below code
select [day] & "April," [period]
order by tbldays.id, tblperiods.period
My table contains id and id1 in place of dSeq and pSeq
Thank you. But still it displays as [Afternoon, Evening, Morning, Night]. I put the below code
select [day] & "April," [period]
order by tbldays.id, tblperiods.period
My table contains id and id1 in place of dSeq and pSeq
This code
has invalid syntax... There is no FROM table name(s)select [day] & "April," [period]
order by tbldays.id, tblperiods.period
Substitute "order by tbldays.id, tblperiods.id1" in the last line. As "orange" pointed out, your query needs also a FROM line, but I understand you have just left it out for the purpose of this post.
order by tblperiods.id1, tblperiods.period gives the following output
1st April, morning
2nd April, morning
3rd April, Morning
1st April, Afternoon
2nd April, Afternoon
etc.
So finally i conclude it might not be possible to get data as I wanted in first post using query in access. I will have do it manually anyway.
Guess we are having a communication barrier here... Try copying and pasting the following:
SELECT [day] & " April, ", [period]
FROM tblDays, tblPeriods
ORDER BY tbldays.id, tblperiods.id1;
If you do it correctly, it will give you exactly what you want.
Wow, finally it worked. Thanks mate.