what is missing here?:confused:
and here
Code:
CN.Execute "INSERT INTO Appointments (AppID, AppDate, AppTime, AppCust, AppHrDr, AppService, AppRemarks) VALUES (" & _
NewID & ", #" & _
MyDate(PckDate.Value) & "#, '" & _
CmbEnd.text & " - " & CmbStart.text & "', " & _
CmbCust.ItemData(CmbCust.ListIndex) & ", " & _
CmbHrDr.ItemData(CmbHrDr.ListIndex) & ", '" & _
RplS(TxtService.text) & "', " & _
RplS(Text1.text) & "')"
Code:
With FrmApps.LsVwHrDr.SelectedItem
CN.Execute "UPDATE Appointments SET " & _
"AppDate= #" & MyDate(PckDate.Value) & "#, " & _
"AppTime= '" & CmbEnd.text & " - " & CmbStart.text & "', " & _
"AppCust= " & CmbCust.ItemData(CmbCust.ListIndex) & ", " & _
"AppService= '" & RplS(TxtService.text) & ", " & _
"AppRemarks='" & RplS(Text1.text) & "' " & _
"WHERE AppID= " & .Tag
.text = Format(PckDate.Value, "dd/mm/yyyy")
.SubItems(2) = CmbEnd.text & " - " & CmbStart.text
.SubItems(3) = TxtService.text
.SubItems (4)= Text1.text