MSDE, forms and text box.

  • Thread starter Thread starter Jake Jessup
  • Start date Start date
J

Jake Jessup

I'm attempting to convert an Access app to an MSDE backend. This is my first
attempt at that.

I managed to get through a few other errors but I'm not quite sure what to
with this one.

Here is my query:

SELECT tblCounties.County, tblCounties.State
FROM tblStates INNER JOIN
tblCounties ON tblStates.StateID = tblCounties.State
WHERE (((tblCounties.State) = Forms ! frmFullInfo ! txtState));

It worke fine in a regular form but it doesn't like the
"Forms!frmFullInfo!txtState" line. What do I need to do with that line so it
will work properly?

All help is appreciated. Thanks.
 
You want the **value** of Forms!frmFullInfo!txtState. However, in the code
you included the database was searching on the actual string expression
"Forms!frmFullInfo!txtState" ... in other words, it was looking for a state
named "Forms!frmFullInfo!txtState" which doesn't exist (at least not in any
country I'm aware of <grin>).

Instead:

WHERE (((tblCounties.State) = '" & Forms ! frmFullInfo ! txtState & "'))"

Note that that is equal sign - single quote - double quote ... then ater
txtState it's ampersand - double quote - single quote
 
Back
Top