Puzzle

J

JamesJ

This is driving me nuts. An unbound text field continues to become
corrupted or something.
I'm using ac 2007 sp1. I installed a hotfix today also.
All of a subdden the textbox doesn't display any data. This occurs during
form design,
Id the filed is already on the form and I use the AutoFormat it magically
stops
displaying data. Next, I created a form and applied the AutoFormat first
then copied and pasted
the textbox, from the form that the textbox is working properly, to the form
and it displayed ok.
I then copied 3 'form functions' (for lack of a better term) from the good
form and pasted into the
debug window and saved the form. Again, the textbox stopped displaying data.
The code for the textbox is below, although I don't believe it has anything
to do with it.

Private Sub Form_Current()

Me.RecordsetClone.MoveLast
Me.txtCount = Me.RecordsetClone.RecordCount & " Item(s)"

End Sub
 
J

JamesJ

This Unbound text box displays the number of records being returned by
the form. Everthing else on the form seems to work properly.
No Error, nothing. The field is there, I can click on it but nothing is
being displayed.
It shows up in design view.
I've created a simple message box in the OnCurrent of the form and that pops
up when I change records. Not sure how I would try to display the number of
records with a message box.

James
 
J

JamesJ

I methodically created a new form based on the same table. I applied the
AutoFormat first and then I copied and pasted the unbound text box, then
the OnCurrent code then the rest of the controls. The form has 4 functions
and I copied and pasted them one at a time saving and then opening the
form after each paste and save. Now, I can't get the problem to repeat. I
even changed the AutoFormat theme 4 times. Before changing it once
would cause the problem.
This might seem odd that one difference. When I make major changes
to form I copy the form a paste it with the same name but a 'new' suffix
This time I named it something else. Maybe access was getting tired
of the name. (right)
I have a sneaking suspicion that this will happen again.

James

ruralguy via AccessMonster.com said:
Private Sub Form_Current()

Me.RecordsetClone.MoveLast
Me.txtCount = Me.RecordsetClone.RecordCount & " Item(s)"
MsgBox Me.RecordsetClone.RecordCount & " Item(s)"
End Sub


This Unbound text box displays the number of records being returned by
the form. Everthing else on the form seems to work properly.
No Error, nothing. The field is there, I can click on it but nothing is
being displayed.
It shows up in design view.
I've created a simple message box in the OnCurrent of the form and that
pops
up when I change records. Not sure how I would try to display the number
of
records with a message box.

James
Does it throw an error? Can you add a MsgBox to display the same
information?
[quoted text clipped - 26 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top