Tupacmoche
Registered User.
- Local time
- Yesterday, 21:46
- Joined
- Apr 28, 2008
- Messages
- 291
I have code to dynamically assign a string to a Combo Box's Row Source. If, I type it into the Row Source property Sheet it works fine:
"Soft";"Joint";"IHO";"IMO";"Faculty & Friends"
But here is the vba:
Dim strPerson As String
Dim strOrg As String
strPerson = ""Soft";"Joint";"IHO";"IMO";"Faculty & Friends""
strOrg = ""Soft";"IHO";"IMO";"Faculty & Friends""
If Nz(DLookup("PersonorOrgan", "dbo_tblTransmittalInfo", "GiftID= " & [GiftID] & " "), "P") = "P" Then
Me.SoftGiftType.Value = strPerson
Else
Me.SoftGiftType.Value = strOrg
End If
The assignment of the two strings strPerson, and strOrg gives me an syntax error msg. How can, I fix the string and make this work?
"Soft";"Joint";"IHO";"IMO";"Faculty & Friends"
But here is the vba:
Dim strPerson As String
Dim strOrg As String
strPerson = ""Soft";"Joint";"IHO";"IMO";"Faculty & Friends""
strOrg = ""Soft";"IHO";"IMO";"Faculty & Friends""
If Nz(DLookup("PersonorOrgan", "dbo_tblTransmittalInfo", "GiftID= " & [GiftID] & " "), "P") = "P" Then
Me.SoftGiftType.Value = strPerson
Else
Me.SoftGiftType.Value = strOrg
End If
The assignment of the two strings strPerson, and strOrg gives me an syntax error msg. How can, I fix the string and make this work?