Ok, Id pull my hair out if I had any. I know this easy but man, Im struggling.
Ok so I open a form form the results of another by passing it a filter. I want to add a new record with the ID the same as the filter. Previously the ID was numeric, now it has Alpha Characters. When I go to the new rec and insert the filter value I get single quotes on either side of the value. How do I get rid of the *&^%&^$% single quotes?
I use a button to add a record utilizing the follwoing code:
Private Sub AddRecBtn_Click()
On Error GoTo Err_AddRecBtn_Click
Dim FieldVal As String
Me.AllowAdditions = True
FieldVal = Me.Filter
FieldVal = Mid$([FieldVal], (InStr(1, [FieldVal], "=") + 1), Len([FieldVal]))
DoCmd.GoToRecord , , acNewRec
Me!CaseNumProcessRef = FieldVal
Me!Step.SetFocus
Me.AllowAdditions = False
Exit_AddRecBtn_Click:
Exit Sub
Err_AddRecBtn_Click:
MsgBox Err.Description
Resume Exit_AddRecBtn_Click
I know this isnt that difficult but man I cant seem to get ther from here.
BC