Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / September 2005

Tip: Looking for answers? Try searching our database.

Type Mismatch

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DS - 29 Sep 2005 20:55 GMT
I'm trying to open a form based on a Query, which then goes to a record
but I keep getting type mismath
Thanks
DS

DoCmd.OpenForm "MenuItems", , "MenuItemsQQ", , , "[MenuCatId] = " &
Me![List44].Column(1) & ""
Klatuu - 29 Sep 2005 21:20 GMT
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
Justin Hoffman - 29 Sep 2005 21:27 GMT
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.