Paul:
YOU'VE BEEN SUCH A HELP....I DONT WANT TO BURN YOU OUT ON MY Question...BUT...
You were right its the extra tick....BUT my form is also giving me problems...it asks me if I really want to append the record I say yes then there are conflicts with other records on the form......I wish I could send the whole thing to you...OR maybe my form construction is wrong....
Here is some of the code...you'll see I made a button for the LISTBOX just to try it...where do you recommend I put the code?
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_MainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database
Public Sub CmdFind_Click()
On Error GoTo Err_CmdFind_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_CmdFind_Click:
Exit Sub
Err_CmdFind_Click:
MsgBox Err.Description
Resume Exit_CmdFind_Click
End Sub
Public Sub CmdAdd_Click()
On Error GoTo Err_CmdAdd_Click
DoCmd.GoToRecord , , acNewRec
Exit_CmdAdd_Click:
Exit Sub
Err_CmdAdd_Click:
MsgBox Err.Description
Resume Exit_CmdAdd_Click
End Sub
Public Sub CmdExit_Click()
On Error GoTo Err_CmdExit_Click
DoCmd.Close
Exit_CmdExit_Click:
Exit Sub
Err_CmdExit_Click:
MsgBox Err.Description
Resume Exit_CmdExit_Click
End Sub
Public Sub CmdDel_Click()
On Error GoTo Err_CmdDel_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_CmdDel_Click:
Exit Sub
Err_CmdDel_Click:
MsgBox Err.Description
Resume Exit_CmdDel_Click
End Sub
Private Sub cmdtest_Click()
Dim varItm As Variant
Dim ctl As Control
Dim mystr As String
Dim strSQL As String
Set ctl = Me.levels
For Each varItm In ctl.ItemsSelected
mystr = mystr & ctl.ItemData(varItm) & ","
Next varItm
mystr = Left(mystr, Len(mystr) - 2)
strSQL = "Insert into Details (Levels) VALUES ('" & mystr & "')"
DoCmd.RunSQL strSQL
End Sub