Dylan Snyder
Registered User.
- Local time
- Today, 04:30
- Joined
- Dec 31, 2007
- Messages
- 89
I want to set the "Fee" Field on a form to the penalty value in the Penalty table where Penalty = "Non-Compliant Docs" This is what I came up with but it keeps telling me there is an error in the From clause. This is my first time using SQL on Forms. Any glaring flaws. Would this even work?
Dim strSQL As String
strSQL = "SELECT Penalties.[Penalty Value]" & _
"FROM Penalties" & _
"WHERE (((Penalties.Penalty)='Non-Compliant Docs'));"
DoCmd.RunSQL strSQL
Me.Fee = strSQL
Dim strSQL As String
strSQL = "SELECT Penalties.[Penalty Value]" & _
"FROM Penalties" & _
"WHERE (((Penalties.Penalty)='Non-Compliant Docs'));"
DoCmd.RunSQL strSQL
Me.Fee = strSQL