Assuming [MenuCatId] is numeric, there is a syntax error:
DoCmd.OpenForm "MenuItems", , "MenuItemsQQ", , , "[MenuCatId] = " &
Me![List44].Column(1) & ""
Should be:
DoCmd.OpenForm "MenuItems", , "MenuItemsQQ", , , "[MenuCatId] = " &
Me![List44].Column(1)
If it is text then it should be:
DoCmd.OpenForm "MenuItems", , "MenuItemsQQ", , , "[MenuCatId] = '" &
Me![List44].Column(1) & "'"
> I'm trying to open a form based on a Query, which then goes to a record
> but I keep getting type mismath
[quoted text clipped - 3 lines]
> DoCmd.OpenForm "MenuItems", , "MenuItemsQQ", , , "[MenuCatId] = " &
> Me![List44].Column(1) & ""
DS - 29 Sep 2005 21:35 GMT
> Assuming [MenuCatId] is numeric, there is a syntax error:
> DoCmd.OpenForm "MenuItems", , "MenuItemsQQ", , , "[MenuCatId] = " &
[quoted text clipped - 14 lines]
>>DoCmd.OpenForm "MenuItems", , "MenuItemsQQ", , , "[MenuCatId] = " &
>>Me![List44].Column(1) & ""
Problem solved. To many commas after MenuItemsQQ it should be one not
three.
Thanks
DS
> I'm trying to open a form based on a Query, which then goes to a record
> but I keep getting type mismath
[quoted text clipped - 3 lines]
> DoCmd.OpenForm "MenuItems", , "MenuItemsQQ", , , "[MenuCatId] = " &
> Me![List44].Column(1) & ""
As I have just put in another post, you should make sure you have a valid
MenuCatID before you move on. Dimension a variable for this and try and
explicitly convert the value to the right type. For example, first make
sure it is not a null value, then convert it to a long, perhaps also make
sure it isn't zero then finally build up the string.