Using a macro, how to add a sqlSequence and change its start value?
The following code always set the start value to 1. I'd like it to be set to dlg.startwTxt
Dim seq As SQLServerSequence
Set seq = mdl.SQLServerSequences.Add(ent.TableName, ent.Owner)
If dlg.startwChbx = 1 Then seq.StartWith = Trim(dlg.startwTxt)End If
I'm guessing that:
returns a string. So you'll need to convert that to an integer first. So I think you'll need to do something like:
seq.StarWith = CInt(Trim(dlg.startwTxt))