Can't set focus?

  • Thread starter Thread starter Jim Shaw
  • Start date Start date
J

Jim Shaw

BlankIn Access 2002, I'm getting runtime error "Can't set focus to
txtAcode".
I'm wondering why that is?

I have two overlapping form controls:
"txtAcode" (a bound textbox), and
"cboAcode" (An unbound combo box).
cboAcode starts out invisible, txtAcode is visible.

Sub txtAcode_click()
cboAcode.visible = true
cboAcode.SetFocus 'This works OK
txtAcode.visible = False
End Sub

Sub cboAcode_GotFocus
cboAcode.DropDown
End Sub

Sub cboAcode_Click
txtAcode = cboAcode.Column(0)
txtAdescr = cboAcode.Column(1)
txtAcode.Visible = True
txtAcode.SetFocus 'This FAILS !!??
cboAcode.Visible = False
End Sub

Any ideas anyone?

Thanks

-Jim
 
Hey!
I just set a break point at Sub cboAcode_Click and stepped through the
logic.
IT WORKED!!??
Removed the break point and it doesn't work!!??
I think we have a real Access bug!!
-JIm
 
May be a timing issue in the code. Insert a DoEvents line between making the
textbox visible and setting focus to it. See if that helps.
 
Ken;
Thanks for the idea, but it did not help.
The problem seems to be related to the use of the combo box "Column()"
method.
If I'm not using that method, SetFocus works.

-Jim
 
I just set up a simple test of your described setup and code. Works for me
without difficulty.

Post the code from the form's module. There may be other code running that
is interfering?
 
Ken;
Thanks for your help. Here is the module's code
Jim

----------------------------------------Cut line---------------------------
Option Compare Database
Option Explicit

Dim WithEvents frmEmp As Form_frmEmpMaint 'This event is not firing
during the problem time

Public Event NewEmp(recPos As Form)
Public Event CurrentRec(recPos As Form)

Private Sub cboDeptID_Click()
txtDeptID.Value = cboDeptID.Column(0)
txtDeptName.Value = cboDeptID.Column(1)
Facility = 472

txtJobCode.SetFocus ' This is failing I tried pointing to
the next field in the tab order.

End Sub

Private Sub cboDeptID_GotFocus()
cboDeptID.Dropdown
End Sub

Private Sub cboDeptID_LostFocus()
txtDeptID.Visible = True
txtDeptID.SetFocus
cboDeptID.Visible = False

End Sub

Private Sub cboJobCode_Click()
txtJobCode = cboJobCode.Column(0)
txtJobDscr = cboJobCode.Column(1)
'Tried the
routine here initially, but it failed
'So I
moved it to the LostFocus event handler below
End Sub

Private Sub cboJobCode_LostFocus()
txtJobCode.Visible = True
txtJobCode.SetFocus
cboJobCode.Visible = False ' This is failing also
****************

End Sub

Private Sub cmdFirst_Click()
On Error GoTo Err_cmdFirst_Click


DoCmd.GoToRecord , , acFirst

Exit_cmdFirst_Click:
Exit Sub

Err_cmdFirst_Click:
MsgBox Err.Description
Resume Exit_cmdFirst_Click

End Sub
Private Sub cmdPrevious_Click()
On Error GoTo Err_cmdPrevious_Click


DoCmd.GoToRecord , , acPrevious

Exit_cmdPrevious_Click:
Exit Sub

Err_cmdPrevious_Click:
MsgBox Err.Description
Resume Exit_cmdPrevious_Click

End Sub
Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click


DoCmd.GoToRecord , , acNext

Exit_cmdNext_Click:
Exit Sub

Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click

End Sub
Private Sub cmdLast_Click()
On Error GoTo Err_cmdLast_Click


DoCmd.GoToRecord , , acLast

Exit_cmdLast_Click:
Exit Sub

Err_cmdLast_Click:
MsgBox Err.Description
Resume Exit_cmdLast_Click

End Sub
Private Sub CmdNew_Click()
On Error GoTo Err_CmdNew_Click


DoCmd.GoToRecord , , acNewRec

Exit_CmdNew_Click:
Exit Sub

Err_CmdNew_Click:
MsgBox Err.Description
Resume Exit_CmdNew_Click

End Sub

Private Sub dteEffectiveDate_Enter()
dteEffectiveDate.SelStart = 0
End Sub

Private Sub Form_Current()
Dim recClone As DAO.Recordset

'Make a clone of the recordset underlying the form so
'we can move around that without affecting the form's
'recordset

Set recClone = Me.RecordsetClone

'Lock up the data related controls so unplanned
'updates don't happen


' If we are in a new record, disable the <Next> button
'and enable the rest of the buttons and controls
If Me.NewRecord Then
cmdFirst.Enabled = True
cmdPrevious.Enabled = True
cmdNext.Enabled = False
cmdLast.Enabled = True
cmdNew.Enabled = True
dteEffectiveDate.ForeColor = 255 'Signal user we are in Record Add
mode

Exit Sub
End If


'IF we reach here, we know we are not in a new record
'so we can enable the <New> button if the form allows
'new records to be added
cmdNew.Enabled = Me.AllowAdditions
dteEffectiveDate.ForeColor = 0 'Signal user we are in Record Add mode

'But we need to check if there are no records. If so,
'we disable al buttons except for the <New> button
If recClone.RecordCount = 0 Then
cmdFirst.Enabled = False
cmdNext.Enabled = False
cmdPrevious.Enabled = False
cmdLast.Enabled = False
Else

'If there are records, we know that the <First> and
'<Last> buttons will always be enabled, irrespective
'of where we are in the recordset
cmdFirst.Enabled = True
cmdLast.Enabled = True

'Synchronize the current pointer in the two recordsets
recClone.Bookmark = Me.Bookmark

'Next, we meust see if we are on the first record
'If so, we should disable the <Previous> button
recClone.MovePrevious
cmdPrevious.Enabled = Not (recClone.BOF)
recClone.MoveNext

'And then check whether we are on the last record
'If so, we should disable the <Next> button
recClone.MoveNext
cmdNext.Enabled = Not (recClone.EOF)
recClone.MovePrevious
End If

'Check for EffectiveDate relative to current data
If dteEffectiveDate > Date Then
dteEffectiveDate.ForeColor = 4227072 'Date is in future, so set font
color to green
Else
dteEffectiveDate.ForeColor = 0 'Date is current or past, so set
font color to black
End If

'And finally close the cloned recordset
recClone.Close

'Tell others where we are in the recordset
If Not EffectiveDate Then
RaiseEvent CurrentRec(Me)
End If

End Sub
Private Sub cmdUndo_Click()
On Error GoTo Err_cmdUndo_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70

Exit_cmdUndo_Click:
Exit Sub

Err_cmdUndo_Click:
MsgBox Err.Description
Resume Exit_cmdUndo_Click

End Sub
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_cmdDelete_Click:
Exit Sub

Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click

End Sub

Private Sub Form_Load()
Set frmEmp = Forms!frmEmpMaint
End Sub
Private Sub frmEmp_NewEmp(strNewEmp As String, Name As String)
'Initial display should be the current history record
'Build record set clone
Dim recClone As DAO.Recordset
Set recClone = Me.RecordsetClone
' recClone.MoveLast 'Init record count

'Need to scan if there are more than 1 candidate records
If recClone.RecordCount > 1 Then
'Remember that records are in date decending order so the
'first record is most current (or futuristic) history record.
recClone.MoveFirst
'Find history record that is current as of this date
Do
If recClone!EffectiveDate > Date Then
recClone.MoveNext
Else
Me.Bookmark = recClone.Bookmark
Exit Do
End If
Loop Until recClone.EOF = True

End If
If recClone.RecordCount > 0 Then
RaiseEvent NewEmp(Me)
End If
recClone.Close

End Sub

Private Sub txtDeptID_Click()

cboDeptID.Visible = True
cboDeptID.SetFocus
txtDeptID.Visible = False

End Sub

Private Sub txtJobCode_Click()
cboJobCode.Visible = True
cboJobCode.SetFocus
txtJobCode.Visible = False
End Sub
Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_cmdSave_Click:
Exit Sub

Err_cmdSave_Click:
MsgBox Err.Description
Resume Exit_cmdSave_Click

End Sub
---------------------------------------------Cut
Line---------------------------
 
I've gone through your code....perhaps a dumb question, but you're trying to
set focus to txtJobCode in the "cboDeptID_Click" code -- is the txtJobCode
textbox visible at that point? Previously in your posts, you had been
referencing a textbox that just prior was being set to a value in one of
cboDeptID's columns. This code doesn't show that same setup.
--
Ken Snell
<MS ACCESS MVP>


Other than that, I don't see anything that would cause the error.
Jim Shaw said:
Ken;
Thanks for your help. Here is the module's code
Jim

----------------------------------------Cut line---------------------------
Option Compare Database
Option Explicit

Dim WithEvents frmEmp As Form_frmEmpMaint 'This event is not firing
during the problem time

Public Event NewEmp(recPos As Form)
Public Event CurrentRec(recPos As Form)

Private Sub cboDeptID_Click()
txtDeptID.Value = cboDeptID.Column(0)
txtDeptName.Value = cboDeptID.Column(1)
Facility = 472

txtJobCode.SetFocus ' This is failing I tried pointing to
the next field in the tab order.

End Sub

Private Sub cboDeptID_GotFocus()
cboDeptID.Dropdown
End Sub

Private Sub cboDeptID_LostFocus()
txtDeptID.Visible = True
txtDeptID.SetFocus
cboDeptID.Visible = False

End Sub

Private Sub cboJobCode_Click()
txtJobCode = cboJobCode.Column(0)
txtJobDscr = cboJobCode.Column(1)
'Tried the
routine here initially, but it failed
'So I
moved it to the LostFocus event handler below
End Sub

Private Sub cboJobCode_LostFocus()
txtJobCode.Visible = True
txtJobCode.SetFocus
cboJobCode.Visible = False ' This is failing also
****************

End Sub

Private Sub cmdFirst_Click()
On Error GoTo Err_cmdFirst_Click


DoCmd.GoToRecord , , acFirst

Exit_cmdFirst_Click:
Exit Sub

Err_cmdFirst_Click:
MsgBox Err.Description
Resume Exit_cmdFirst_Click

End Sub
Private Sub cmdPrevious_Click()
On Error GoTo Err_cmdPrevious_Click


DoCmd.GoToRecord , , acPrevious

Exit_cmdPrevious_Click:
Exit Sub

Err_cmdPrevious_Click:
MsgBox Err.Description
Resume Exit_cmdPrevious_Click

End Sub
Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click


DoCmd.GoToRecord , , acNext

Exit_cmdNext_Click:
Exit Sub

Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click

End Sub
Private Sub cmdLast_Click()
On Error GoTo Err_cmdLast_Click


DoCmd.GoToRecord , , acLast

Exit_cmdLast_Click:
Exit Sub

Err_cmdLast_Click:
MsgBox Err.Description
Resume Exit_cmdLast_Click

End Sub
Private Sub CmdNew_Click()
On Error GoTo Err_CmdNew_Click


DoCmd.GoToRecord , , acNewRec

Exit_CmdNew_Click:
Exit Sub

Err_CmdNew_Click:
MsgBox Err.Description
Resume Exit_CmdNew_Click

End Sub

Private Sub dteEffectiveDate_Enter()
dteEffectiveDate.SelStart = 0
End Sub

Private Sub Form_Current()
Dim recClone As DAO.Recordset

'Make a clone of the recordset underlying the form so
'we can move around that without affecting the form's
'recordset

Set recClone = Me.RecordsetClone

'Lock up the data related controls so unplanned
'updates don't happen


' If we are in a new record, disable the <Next> button
'and enable the rest of the buttons and controls
If Me.NewRecord Then
cmdFirst.Enabled = True
cmdPrevious.Enabled = True
cmdNext.Enabled = False
cmdLast.Enabled = True
cmdNew.Enabled = True
dteEffectiveDate.ForeColor = 255 'Signal user we are in Record Add
mode

Exit Sub
End If


'IF we reach here, we know we are not in a new record
'so we can enable the <New> button if the form allows
'new records to be added
cmdNew.Enabled = Me.AllowAdditions
dteEffectiveDate.ForeColor = 0 'Signal user we are in Record Add mode

'But we need to check if there are no records. If so,
'we disable al buttons except for the <New> button
If recClone.RecordCount = 0 Then
cmdFirst.Enabled = False
cmdNext.Enabled = False
cmdPrevious.Enabled = False
cmdLast.Enabled = False
Else

'If there are records, we know that the <First> and
'<Last> buttons will always be enabled, irrespective
'of where we are in the recordset
cmdFirst.Enabled = True
cmdLast.Enabled = True

'Synchronize the current pointer in the two recordsets
recClone.Bookmark = Me.Bookmark

'Next, we meust see if we are on the first record
'If so, we should disable the <Previous> button
recClone.MovePrevious
cmdPrevious.Enabled = Not (recClone.BOF)
recClone.MoveNext

'And then check whether we are on the last record
'If so, we should disable the <Next> button
recClone.MoveNext
cmdNext.Enabled = Not (recClone.EOF)
recClone.MovePrevious
End If

'Check for EffectiveDate relative to current data
If dteEffectiveDate > Date Then
dteEffectiveDate.ForeColor = 4227072 'Date is in future, so set font
color to green
Else
dteEffectiveDate.ForeColor = 0 'Date is current or past, so set
font color to black
End If

'And finally close the cloned recordset
recClone.Close

'Tell others where we are in the recordset
If Not EffectiveDate Then
RaiseEvent CurrentRec(Me)
End If

End Sub
Private Sub cmdUndo_Click()
On Error GoTo Err_cmdUndo_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70

Exit_cmdUndo_Click:
Exit Sub

Err_cmdUndo_Click:
MsgBox Err.Description
Resume Exit_cmdUndo_Click

End Sub
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_cmdDelete_Click:
Exit Sub

Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click

End Sub

Private Sub Form_Load()
Set frmEmp = Forms!frmEmpMaint
End Sub
Private Sub frmEmp_NewEmp(strNewEmp As String, Name As String)
'Initial display should be the current history record
'Build record set clone
Dim recClone As DAO.Recordset
Set recClone = Me.RecordsetClone
' recClone.MoveLast 'Init record count

'Need to scan if there are more than 1 candidate records
If recClone.RecordCount > 1 Then
'Remember that records are in date decending order so the
'first record is most current (or futuristic) history record.
recClone.MoveFirst
'Find history record that is current as of this date
Do
If recClone!EffectiveDate > Date Then
recClone.MoveNext
Else
Me.Bookmark = recClone.Bookmark
Exit Do
End If
Loop Until recClone.EOF = True

End If
If recClone.RecordCount > 0 Then
RaiseEvent NewEmp(Me)
End If
recClone.Close

End Sub

Private Sub txtDeptID_Click()

cboDeptID.Visible = True
cboDeptID.SetFocus
txtDeptID.Visible = False

End Sub

Private Sub txtJobCode_Click()
cboJobCode.Visible = True
cboJobCode.SetFocus
txtJobCode.Visible = False
End Sub
Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_cmdSave_Click:
Exit Sub

Err_cmdSave_Click:
MsgBox Err.Description
Resume Exit_cmdSave_Click

End Sub
---------------------------------------------Cut
Line---------------------------
 
You are looking at yet another attempted work-a-round. The original code
tried to set the focus to txtDeptID in cboDeptID_Click. When that didn't
work and I ran out of ideas, I tried moving the code to the next control
available that was not involved with the controls involved in the problem
domain.

Ken! I really appreciate your digging into this. I work alone and have no
one in my office to bounce problems like this off of. That is an important
resource for developers.

-Jim

Ken Snell said:
I've gone through your code....perhaps a dumb question, but you're trying to
set focus to txtJobCode in the "cboDeptID_Click" code -- is the txtJobCode
textbox visible at that point? Previously in your posts, you had been
referencing a textbox that just prior was being set to a value in one of
cboDeptID's columns. This code doesn't show that same setup.
--
Ken Snell
<MS ACCESS MVP>


Other than that, I don't see anything that would cause the error.
Jim Shaw said:
Ken;
Thanks for your help. Here is the module's code
Jim

----------------------------------------Cut line---------------------------
Option Compare Database
Option Explicit

Dim WithEvents frmEmp As Form_frmEmpMaint 'This event is not firing
during the problem time

Public Event NewEmp(recPos As Form)
Public Event CurrentRec(recPos As Form)

Private Sub cboDeptID_Click()
txtDeptID.Value = cboDeptID.Column(0)
txtDeptName.Value = cboDeptID.Column(1)
Facility = 472

txtJobCode.SetFocus ' This is failing I tried pointing to
the next field in the tab order.

End Sub

Private Sub cboDeptID_GotFocus()
cboDeptID.Dropdown
End Sub

Private Sub cboDeptID_LostFocus()
txtDeptID.Visible = True
txtDeptID.SetFocus
cboDeptID.Visible = False

End Sub

Private Sub cboJobCode_Click()
txtJobCode = cboJobCode.Column(0)
txtJobDscr = cboJobCode.Column(1)
'Tried the
routine here initially, but it failed
'So I
moved it to the LostFocus event handler below
End Sub

Private Sub cboJobCode_LostFocus()
txtJobCode.Visible = True
txtJobCode.SetFocus
cboJobCode.Visible = False ' This is failing also
****************

End Sub

Private Sub cmdFirst_Click()
On Error GoTo Err_cmdFirst_Click


DoCmd.GoToRecord , , acFirst

Exit_cmdFirst_Click:
Exit Sub

Err_cmdFirst_Click:
MsgBox Err.Description
Resume Exit_cmdFirst_Click

End Sub
Private Sub cmdPrevious_Click()
On Error GoTo Err_cmdPrevious_Click


DoCmd.GoToRecord , , acPrevious

Exit_cmdPrevious_Click:
Exit Sub

Err_cmdPrevious_Click:
MsgBox Err.Description
Resume Exit_cmdPrevious_Click

End Sub
Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click


DoCmd.GoToRecord , , acNext

Exit_cmdNext_Click:
Exit Sub

Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click

End Sub
Private Sub cmdLast_Click()
On Error GoTo Err_cmdLast_Click


DoCmd.GoToRecord , , acLast

Exit_cmdLast_Click:
Exit Sub

Err_cmdLast_Click:
MsgBox Err.Description
Resume Exit_cmdLast_Click

End Sub
Private Sub CmdNew_Click()
On Error GoTo Err_CmdNew_Click


DoCmd.GoToRecord , , acNewRec

Exit_CmdNew_Click:
Exit Sub

Err_CmdNew_Click:
MsgBox Err.Description
Resume Exit_CmdNew_Click

End Sub

Private Sub dteEffectiveDate_Enter()
dteEffectiveDate.SelStart = 0
End Sub

Private Sub Form_Current()
Dim recClone As DAO.Recordset

'Make a clone of the recordset underlying the form so
'we can move around that without affecting the form's
'recordset

Set recClone = Me.RecordsetClone

'Lock up the data related controls so unplanned
'updates don't happen


' If we are in a new record, disable the <Next> button
'and enable the rest of the buttons and controls
If Me.NewRecord Then
cmdFirst.Enabled = True
cmdPrevious.Enabled = True
cmdNext.Enabled = False
cmdLast.Enabled = True
cmdNew.Enabled = True
dteEffectiveDate.ForeColor = 255 'Signal user we are in Record Add
mode

Exit Sub
End If


'IF we reach here, we know we are not in a new record
'so we can enable the <New> button if the form allows
'new records to be added
cmdNew.Enabled = Me.AllowAdditions
dteEffectiveDate.ForeColor = 0 'Signal user we are in Record Add mode

'But we need to check if there are no records. If so,
'we disable al buttons except for the <New> button
If recClone.RecordCount = 0 Then
cmdFirst.Enabled = False
cmdNext.Enabled = False
cmdPrevious.Enabled = False
cmdLast.Enabled = False
Else

'If there are records, we know that the <First> and
'<Last> buttons will always be enabled, irrespective
'of where we are in the recordset
cmdFirst.Enabled = True
cmdLast.Enabled = True

'Synchronize the current pointer in the two recordsets
recClone.Bookmark = Me.Bookmark

'Next, we meust see if we are on the first record
'If so, we should disable the <Previous> button
recClone.MovePrevious
cmdPrevious.Enabled = Not (recClone.BOF)
recClone.MoveNext

'And then check whether we are on the last record
'If so, we should disable the <Next> button
recClone.MoveNext
cmdNext.Enabled = Not (recClone.EOF)
recClone.MovePrevious
End If

'Check for EffectiveDate relative to current data
If dteEffectiveDate > Date Then
dteEffectiveDate.ForeColor = 4227072 'Date is in future, so set font
color to green
Else
dteEffectiveDate.ForeColor = 0 'Date is current or past, so set
font color to black
End If

'And finally close the cloned recordset
recClone.Close

'Tell others where we are in the recordset
If Not EffectiveDate Then
RaiseEvent CurrentRec(Me)
End If

End Sub
Private Sub cmdUndo_Click()
On Error GoTo Err_cmdUndo_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70

Exit_cmdUndo_Click:
Exit Sub

Err_cmdUndo_Click:
MsgBox Err.Description
Resume Exit_cmdUndo_Click

End Sub
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_cmdDelete_Click:
Exit Sub

Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click

End Sub

Private Sub Form_Load()
Set frmEmp = Forms!frmEmpMaint
End Sub
Private Sub frmEmp_NewEmp(strNewEmp As String, Name As String)
'Initial display should be the current history record
'Build record set clone
Dim recClone As DAO.Recordset
Set recClone = Me.RecordsetClone
' recClone.MoveLast 'Init record count

'Need to scan if there are more than 1 candidate records
If recClone.RecordCount > 1 Then
'Remember that records are in date decending order so the
'first record is most current (or futuristic) history record.
recClone.MoveFirst
'Find history record that is current as of this date
Do
If recClone!EffectiveDate > Date Then
recClone.MoveNext
Else
Me.Bookmark = recClone.Bookmark
Exit Do
End If
Loop Until recClone.EOF = True

End If
If recClone.RecordCount > 0 Then
RaiseEvent NewEmp(Me)
End If
recClone.Close

End Sub

Private Sub txtDeptID_Click()

cboDeptID.Visible = True
cboDeptID.SetFocus
txtDeptID.Visible = False

End Sub

Private Sub txtJobCode_Click()
cboJobCode.Visible = True
cboJobCode.SetFocus
txtJobCode.Visible = False
End Sub
Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_cmdSave_Click:
Exit Sub

Err_cmdSave_Click:
MsgBox Err.Description
Resume Exit_cmdSave_Click

End Sub
---------------------------------------------Cut
Line---------------------------
for
 
If you can zip up a representative sample of your database and email to me
(remove this is not real from address), I'll take a look as time permits to
see if I can discover what may be happening.
 
Ken;
I don't know what happened, but it started working the way it should!!??

I got an intuitive feeling that something was corrupted somewhere so,
I built a new database and imported all the code from the old database.
I think that might have something to do with the fix.

Please stand down from this problem for now. I'll continue testing and if
the problem
arises again, I'll do another post.

Thanks again
Best regards
-Jim
 
Glad to hear it. I shoulda suggested corruption as a possible cause, but....
I didn't!

Good luck.
 
Back
Top