thenelson
asked on
VBA Line causes Access to hang up.
The following line causes Access 2003 to hang up:
Me.ComplaintID.Text = strFilter
ComplaintID is a combobox, strFilter contains any string.
When the code reaches that line, Access just hangs, no error message. I have to go into task manager to close Access down.
I precede that line with:
Me.ComplaintID.SetFocus
I have tried other forms of the line such as:
Forms.frmPt.ComplaintID.Te xt = strFilter
frmPt!ComplaintID.Text = strFilter
ComplaintID.Text = strFilter
with the same result.
I have used
Me.ComplaintID.Text =
in other areas of the object module without problem.
Any ideas what is going on?
Me.ComplaintID.Text = strFilter
ComplaintID is a combobox, strFilter contains any string.
When the code reaches that line, Access just hangs, no error message. I have to go into task manager to close Access down.
I precede that line with:
Me.ComplaintID.SetFocus
I have tried other forms of the line such as:
Forms.frmPt.ComplaintID.Te
frmPt!ComplaintID.Text = strFilter
ComplaintID.Text = strFilter
with the same result.
I have used
Me.ComplaintID.Text =
in other areas of the object module without problem.
Any ideas what is going on?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found where the problem is. I have a do loop in the not in list event of ComplaintID that is not completing. By explaining what is happening to all of you, I realized I needed to step through the code. So now I need to fit the do loop. Thanks to all who responded.
ASKER
strFilter contains any string. I have tried several different strings from a zero length string to a string of the maximum length of the displayed field for ComplaintID.
I do have:
Me.ComplaintID.SetFocus
Me.ComplaintID.Text = strFilter