Can't choose data in combo box

T

Tony Wainwright

I have a form that is bound to a query that takes a date parameter. On the form there is a combo box that selects all the dates in a table that is part of the query. What I want to do is for the user to select a date from the combo box and then refresh the underlying query. For some reason, when I drop the combo box down it shows all the dates, but won't let me select any.

The query for the form is:
SELECT [Field List]
FROM [Table1] INNER JOIN [Table 2] ON [Table 1].ID=[Table 2].ID
WHERE [Table 2].Date = Forms!frm!Date;

The RowSource for the Combo box is
SELECT DISTINCT Date FROM [Table 2];

Does anyone know where I am going wrong?

I have also tried populating the combo box by using the AddItem method but Access won't recognise it as a method of a combo box. I think that there may be a reference missing but I can't seem to find which one. I have recently formatted the PC and re-installed everything including Access 2000

Cheers Tony
 
P

Pavel Romashkin

On the property sheet, is the ComboBox Locked? It also should be unbound
since it is not designed to update data in the table.
It is also recommended to avoid using the word "Date" for naming
controls and variables. Name them cbDate, fldDate, myDate.

Good luck,
Pavel
 

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