Value isn't Valid

RussG

Registered User.
Local time
Today, 23:50
Joined
Feb 10, 2001
Messages
178
Hi - Looking for some help which I suspect will be something obvious.

I have a form that is based on a query, I am using the query as a record source so I can filter the form by a date range.

On the form I have 2 combo boxes which use 'Lookup' tables to get their values.
On the form-when I click into one of the combo boxes I get the message 'The value entered isn't valid for this field' .

If I change the record source to the table there is no problem but using the query there is, I can't quiet work out why this happening. The bound column is 1 (as per the table) and the column count is 2 (0cm;2.25cm) so I can see the descriptive text.

Would appreciate any suggestions.

RussG
 
What is the datatype for that field in the table and what is the SQL for the query?
 
Hi Bob, thanks for your reply;

The Data type is Number.

SQL for the combo box;

SELECT tblCatagory.CatID, tblCatagory.Catagory FROM tblCatagory ORDER BY [Catagory];

SQL for the form query;

SELECT tblSchedule.SIID, tblCatagory.Catagory, tblScheme.Scheme, tblSchedule.DueDate, tblSchedule.Action, tblSchedule.Notes, Format$([DueDate],"mmmm yyyy",0,0) AS [Date]
FROM tblScheme INNER JOIN (tblCatagory INNER JOIN tblSchedule ON tblCatagory.CatID = tblSchedule.Catagory) ON tblScheme.SchemeID = tblSchedule.Scheme
WHERE (((tblCatagory.Catagory) Like nz([forms]![frmDialog]![cbo1],"*")) AND ((tblScheme.Scheme) Like NZ([forms]![frmDialog]![cbo2],"*")) AND ((tblSchedule.DueDate) Between [forms]![frmDialog]![txt1] And [forms]![frmDialog]![txt2]));

Thanks
RussG
 
Last edited:
Sorry for such late response. It's been hectic here.

What fields are your combo boxes being bound to.
 
Hi again - the bound field is CatID.

I have already sorted a workaround by removing the autonumber field from the Lookup table (tblCatagory), so the description is stored in the table rather than the record ID. Not as efficient (not going to be a huge amount of data stored ) but it does solve my problem above.

However , I am still curious to know why this didn't work, the bound column was 1 in both my forms (the one based on the table and the one based on the query) with column 2 being visible as a descriptive view to the user.

regards
RussG
 

Users who are viewing this thread

Back
Top Bottom