I have an Access Database that links to a SQL Server Database there is 1 local Table for the Data specific to this DB. The link between the Access Data and SQL Server is a field that is formatted as Replication ID. This all works fine. The issue is that if a new record needs to be inserted into the local Database I have a command button that opens a new record form and when the user clicks on the Save Record button it processes the following code:

Private Sub cmd_Add_new_Click()
Dim strsql As String
Dim adocmd As ADODB.Command
Set adocmd = New ADODB.Command
adocmd.ActiveConnection = CurrentProject.Connection

strsql = "Insert Into tbl_Chronic_HCC_2012 (MEMB_KEYID, PROV_KEYID,[Potential Risk],ValidID) Values ("
strsql = strsql & Me.txtmbrkey & "," & Me.txtProvKey & ",""" & Me.txtPotentialRisk & """," & Me.frmValidity.Value & ")"
adocmd.CommandText = strsql
adocmd.Execute

End Sub

the txtmbrkey and txtProvkey are 2 Hidden textboxes that have the Replication ID's from the SQL Server Database. If I use the immediate window and show the strsql this is what I see

Insert Into tbl_Chronic_HCC_2012 (MEMB_KEYID, PROV_KEYID,[Potential Risk],ValidID) Values (????????,????????,"High",2)




The correct values are in the text boxes so what did I miss.