Display data differently in a combobox to it's table

  • Thread starter Thread starter s4
  • Start date Start date
S

s4

Hi,

I have a table that includes fields Start Date, End Date, Start Time Hr,
Start Time Min, End Time hr, End Time min

I could do with keeping the minute and hours seperate, I have a combo box
that looks up the values above but to make it more user friendly could do
with it saying instead "STARTDATE,ENDDATE HH:MM TO HH:MM"

The combo's control source is:
SELECT [timesset].[START_DATE], [timesset].[HOURSst], [timesset].[MINSst],
[timesset].[HOURSfi], [timesset].[MINSfi] FROM timesset;

Could anyone help me with a control source that would make it be displayed
as I need it?

Thanks in advance
 
I imagine you're already aware that a date field actually comprises both
date AND time?

To display date and time in a single column:
SELECT RecordID,
Format(START_DATE, "mm/dd/yyyy")
& " " & Format(END_DATE, "mm/dd/yyyy")
& " " & Format(HOURSst, "00")
& ":" & Format(MINSst, "00")
& " TO " & Format(HOURSfi, "00")
& ":" & Format(MINSfi, "00")
AS Times
FROM timesset

....then hide the RecordID column.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Thanks, that's exactly what I needed

Graham R Seach said:
I imagine you're already aware that a date field actually comprises both
date AND time?

To display date and time in a single column:
SELECT RecordID,
Format(START_DATE, "mm/dd/yyyy")
& " " & Format(END_DATE, "mm/dd/yyyy")
& " " & Format(HOURSst, "00")
& ":" & Format(MINSst, "00")
& " TO " & Format(HOURSfi, "00")
& ":" & Format(MINSfi, "00")
AS Times
FROM timesset

...then hide the RecordID column.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

s4 said:
Hi,

I have a table that includes fields Start Date, End Date, Start Time Hr,
Start Time Min, End Time hr, End Time min

I could do with keeping the minute and hours seperate, I have a combo box
that looks up the values above but to make it more user friendly could do
with it saying instead "STARTDATE,ENDDATE HH:MM TO HH:MM"

The combo's control source is:
SELECT [timesset].[START_DATE], [timesset].[HOURSst],
[timesset].[MINSst],
[timesset].[HOURSfi], [timesset].[MINSfi] FROM timesset;

Could anyone help me with a control source that would make it be displayed
as I need it?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top