Combo Box Not Working

G

Guest

I’m new to access but learning quickly. I’m trying to create a data base for
our “time change†items on out plant equipment. Such as;

Furnace (asset)

Clutch (part)

Installed date (date installed)

Replacement date (set date in the future e.g. 6 months from install date)

I already have a table with the columns named asset, part, installed date
and replacement date. It’s called Table 1.

All dates are formatted to medium date format and input mask the same.
I also have a table with IntervalTitle, Interval and IntervalIncrement set
as follows:

IntervalTitle Interval
IntervalIncrement
1 week d 7
2 weeks d 14
1 month m 1
3 month m 3
6 month m 6
12 month m 12

IntervalTitle and Interval are TEXT and IntervalIncrement in Date/Time, Date
medium, input mask the same. It’s called tblDateIntervals

I have a query (called DateIntervals) to find the wanted date that the
interval is asking for. The SQL is as follows:
SELECT tblDateIntervals.IntervalTitle,
DateAdd([Interval],[IntervalIncrement],Date()) AS CalcDate
FROM tblDateIntervals
ORDER BY DateAdd([Interval],[IntervalIncrement],Date());

This works! The query shows two columns. One is called IntervalTitle and it
shows the interval asked (1 week, 2 weeks etc…). The other is the CalcDate
that shows the correct calculated time and expresses it as medium date.

Finally to my dilemma!

I have created a form to enter the data to the above fields in the table,
they all work. Then I created a combo box to enter the calculated date to the
original first table (Table 1, Replacement Date). The combo box properties
are set as follows:
Control source Replacement Date (from Table 1)
Format dd-mmm-yy
Row Source Type Table/Query
Row Source DateIntervals (from the query)

Now when I try to use the form, everything works up until I try to use the
combo box to select the proper time interval (1 week, 2 weeks etc…). The time
intervals show up in the combo box when selected, however when selected, I
get an error message “The Value You Entered Isn’t Valid For This Fieldâ€
Arrrrrr……So close!!!

Any suggestions?????? Thanks in advanced
 
G

Guest

Assuming that the combobox is a source to a field in the table, the bound
column of the combo should be the same datatype of that field that it is
based.

It sounds like you're trying to stuff a text into the date data type.

--
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting



Jeff G said:
I’m new to access but learning quickly. I’m trying to create a data base for
our “time change†items on out plant equipment. Such as;

Furnace (asset)

Clutch (part)

Installed date (date installed)

Replacement date (set date in the future e.g. 6 months from install date)

I already have a table with the columns named asset, part, installed date
and replacement date. It’s called Table 1.

All dates are formatted to medium date format and input mask the same.
I also have a table with IntervalTitle, Interval and IntervalIncrement set
as follows:

IntervalTitle Interval
IntervalIncrement
1 week d 7
2 weeks d 14
1 month m 1
3 month m 3
6 month m 6
12 month m 12

IntervalTitle and Interval are TEXT and IntervalIncrement in Date/Time, Date
medium, input mask the same. It’s called tblDateIntervals

I have a query (called DateIntervals) to find the wanted date that the
interval is asking for. The SQL is as follows:
SELECT tblDateIntervals.IntervalTitle,
DateAdd([Interval],[IntervalIncrement],Date()) AS CalcDate
FROM tblDateIntervals
ORDER BY DateAdd([Interval],[IntervalIncrement],Date());

This works! The query shows two columns. One is called IntervalTitle and it
shows the interval asked (1 week, 2 weeks etc…). The other is the CalcDate
that shows the correct calculated time and expresses it as medium date.

Finally to my dilemma!

I have created a form to enter the data to the above fields in the table,
they all work. Then I created a combo box to enter the calculated date to the
original first table (Table 1, Replacement Date). The combo box properties
are set as follows:
Control source Replacement Date (from Table 1)
Format dd-mmm-yy
Row Source Type Table/Query
Row Source DateIntervals (from the query)

Now when I try to use the form, everything works up until I try to use the
combo box to select the proper time interval (1 week, 2 weeks etc…). The time
intervals show up in the combo box when selected, however when selected, I
get an error message “The Value You Entered Isn’t Valid For This Fieldâ€
Arrrrrr……So close!!!

Any suggestions?????? Thanks in advanced
 
G

Guest

Thanks for the info. It got me looking at other possibilities. I found what
was happening. The combo box was showing the asked value (1 week, 2 weeks
etc...) the field was set to a medium date......Text into a date........wont
work. So I hid the column in the query and YEA!!!...It worked. the only thing
is that it doesn’t show up on me form as I intended (I like to see the 1
week, 2 weeks etc...) so I just put a unbound text box next to it so it acts
like a label when you use the combo box......

Once again, thank you for you insight and help.

--
Jeff G
Maintenance Tech
Milgard Tempering


Jeff G said:
I’m new to access but learning quickly. I’m trying to create a data base for
our “time change†items on out plant equipment. Such as;

Furnace (asset)

Clutch (part)

Installed date (date installed)

Replacement date (set date in the future e.g. 6 months from install date)

I already have a table with the columns named asset, part, installed date
and replacement date. It’s called Table 1.

All dates are formatted to medium date format and input mask the same.
I also have a table with IntervalTitle, Interval and IntervalIncrement set
as follows:

IntervalTitle Interval
IntervalIncrement
1 week d 7
2 weeks d 14
1 month m 1
3 month m 3
6 month m 6
12 month m 12

IntervalTitle and Interval are TEXT and IntervalIncrement in Date/Time, Date
medium, input mask the same. It’s called tblDateIntervals

I have a query (called DateIntervals) to find the wanted date that the
interval is asking for. The SQL is as follows:
SELECT tblDateIntervals.IntervalTitle,
DateAdd([Interval],[IntervalIncrement],Date()) AS CalcDate
FROM tblDateIntervals
ORDER BY DateAdd([Interval],[IntervalIncrement],Date());

This works! The query shows two columns. One is called IntervalTitle and it
shows the interval asked (1 week, 2 weeks etc…). The other is the CalcDate
that shows the correct calculated time and expresses it as medium date.

Finally to my dilemma!

I have created a form to enter the data to the above fields in the table,
they all work. Then I created a combo box to enter the calculated date to the
original first table (Table 1, Replacement Date). The combo box properties
are set as follows:
Control source Replacement Date (from Table 1)
Format dd-mmm-yy
Row Source Type Table/Query
Row Source DateIntervals (from the query)

Now when I try to use the form, everything works up until I try to use the
combo box to select the proper time interval (1 week, 2 weeks etc…). The time
intervals show up in the combo box when selected, however when selected, I
get an error message “The Value You Entered Isn’t Valid For This Fieldâ€
Arrrrrr……So close!!!

Any suggestions?????? Thanks in advanced
 

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

Top