Access 2000 Form Doesn't Repaint Properly! 
Author Message
 Access 2000 Form Doesn't Repaint Properly!

Found a weired problem!!!

My friend created a very simple access form with a sub-form.

It is an ADP with SQL Server database as the back end.

On the main form, there is a combo box linked to a table, and a text box.
When the user selects an item from the combo box, the item's id should
appear in the text box.

The sub-form is based on the same table and linked to the text box on the
main form.

So, the whole process should be that when the user selects an item from the
combo box, the text box gets updated with the item's id, and the sub-form
gets populated with related data.

There were only 2 lines in the Click event of the combo box.

Me.txtDealerID = Me.cmbDealer.Column(1)
Me.subDealer.Requery

So, when he tried to select an item from the combo box, the text box got
updated sometimes with the word "Dealer" (could be table name, or value in
one of the fields in the table, but definitely not from the ID column), and
sometimes with a code 'UTF-8'. We have no idea what UTF-8 means.

Anyway, I tried to resolve this problem by adding 2 DoEvents to the code so
that it became:

Me.txtDealerID = Me.cmbDealer.Column(1)
DoEvents
Me.subDealer.Requery
DoEvents

This seemed to have solved the problem. The text box got updated with the
item's ID and the sub-form got populated with correct data.

However, by chance, I moved another window (Notepad) over the access form,
and when I removed that window, the textbox got changed to 'Dealer' again. I
repeat this process many more times, while the text box was displaying the
item's id, move a window over it will change it to either 'Dealer' or
'UTF-8'. This is terrible. My friend said that he's already applied service
pack 1, 1a and 2, but none of those help resolved the many issues he's got
with Access forms.

Anybody encountered similar problem in Access?



Sun, 04 Jul 2004 05:47:16 GMT  
 Access 2000 Form Doesn't Repaint Properly!
Perhaps you could post the SQL defining the columns in the combobox?

    - Turtle


Quote:
> Found a weired problem!!!

> My friend created a very simple access form with a sub-form.

> It is an ADP with SQL Server database as the back end.

> On the main form, there is a combo box linked to a table, and a text box.
> When the user selects an item from the combo box, the item's id should
> appear in the text box.

> The sub-form is based on the same table and linked to the text box on the
> main form.

> So, the whole process should be that when the user selects an item from
the
> combo box, the text box gets updated with the item's id, and the sub-form
> gets populated with related data.

> There were only 2 lines in the Click event of the combo box.

> Me.txtDealerID = Me.cmbDealer.Column(1)
> Me.subDealer.Requery

> So, when he tried to select an item from the combo box, the text box got
> updated sometimes with the word "Dealer" (could be table name, or value in
> one of the fields in the table, but definitely not from the ID column),
and
> sometimes with a code 'UTF-8'. We have no idea what UTF-8 means.

> Anyway, I tried to resolve this problem by adding 2 DoEvents to the code
so
> that it became:

> Me.txtDealerID = Me.cmbDealer.Column(1)
> DoEvents
> Me.subDealer.Requery
> DoEvents

> This seemed to have solved the problem. The text box got updated with the
> item's ID and the sub-form got populated with correct data.

> However, by chance, I moved another window (Notepad) over the access form,
> and when I removed that window, the textbox got changed to 'Dealer' again.
I
> repeat this process many more times, while the text box was displaying the
> item's id, move a window over it will change it to either 'Dealer' or
> 'UTF-8'. This is terrible. My friend said that he's already applied
service
> pack 1, 1a and 2, but none of those help resolved the many issues he's got
> with Access forms.

> Anybody encountered similar problem in Access?



Sun, 04 Jul 2004 12:00:58 GMT  
 Access 2000 Form Doesn't Repaint Properly!
Right click your combo box and select properties. It's probably setup
something like
 Column Count = 2(or more)
Column Widths = 0";2"(etc.)  The 0" hides the first column.  Change to 1"(or
something like that to see the contents of column 1).  The bound column
doesn't have to be visible to reference it and is usually hidden like this
because it's normally some kind of autonumber or other unique ID field.  The
bound column is probably set to column 1.  Move your code to the after
update event vice the on click event.  Now after you select a value from the
combo box it will set the value of your text box which I presume is the
criteria field for the recordsource of the subform.  Once set it will
requery the subform.

Me.txtDealerID = Me.cmbDealer.Column(1)
Me.subDealer.Requery

--

Reggie
[Remove NOSPAM to email me]

Quote:
> Perhaps you could post the SQL defining the columns in the combobox?

>     - Turtle



> > Found a weired problem!!!

> > My friend created a very simple access form with a sub-form.

> > It is an ADP with SQL Server database as the back end.

> > On the main form, there is a combo box linked to a table, and a text
box.
> > When the user selects an item from the combo box, the item's id should
> > appear in the text box.

> > The sub-form is based on the same table and linked to the text box on
the
> > main form.

> > So, the whole process should be that when the user selects an item from
> the
> > combo box, the text box gets updated with the item's id, and the
sub-form
> > gets populated with related data.

> > There were only 2 lines in the Click event of the combo box.

> > Me.txtDealerID = Me.cmbDealer.Column(1)
> > Me.subDealer.Requery

> > So, when he tried to select an item from the combo box, the text box got
> > updated sometimes with the word "Dealer" (could be table name, or value
in
> > one of the fields in the table, but definitely not from the ID column),
> and
> > sometimes with a code 'UTF-8'. We have no idea what UTF-8 means.

> > Anyway, I tried to resolve this problem by adding 2 DoEvents to the code
> so
> > that it became:

> > Me.txtDealerID = Me.cmbDealer.Column(1)
> > DoEvents
> > Me.subDealer.Requery
> > DoEvents

> > This seemed to have solved the problem. The text box got updated with
the
> > item's ID and the sub-form got populated with correct data.

> > However, by chance, I moved another window (Notepad) over the access
form,
> > and when I removed that window, the textbox got changed to 'Dealer'
again.
> I
> > repeat this process many more times, while the text box was displaying
the
> > item's id, move a window over it will change it to either 'Dealer' or
> > 'UTF-8'. This is terrible. My friend said that he's already applied
> service
> > pack 1, 1a and 2, but none of those help resolved the many issues he's
got
> > with Access forms.

> > Anybody encountered similar problem in Access?



Sun, 04 Jul 2004 13:34:00 GMT  
 Access 2000 Form Doesn't Repaint Properly!
Hi,
Well, UTF-8 is a string encoding method!
Don't know where that's coming from.

Dan Artuso, MVP

Quote:

> Found a weired problem!!!

> My friend created a very simple access form with a sub-form.

> It is an ADP with SQL Server database as the back end.

> On the main form, there is a combo box linked to a table, and a text box.
> When the user selects an item from the combo box, the item's id should
> appear in the text box.

> The sub-form is based on the same table and linked to the text box on the
> main form.

> So, the whole process should be that when the user selects an item from the
> combo box, the text box gets updated with the item's id, and the sub-form
> gets populated with related data.

> There were only 2 lines in the Click event of the combo box.

> Me.txtDealerID = Me.cmbDealer.Column(1)
> Me.subDealer.Requery

> So, when he tried to select an item from the combo box, the text box got
> updated sometimes with the word "Dealer" (could be table name, or value in
> one of the fields in the table, but definitely not from the ID column), and
> sometimes with a code 'UTF-8'. We have no idea what UTF-8 means.

> Anyway, I tried to resolve this problem by adding 2 DoEvents to the code so
> that it became:

> Me.txtDealerID = Me.cmbDealer.Column(1)
> DoEvents
> Me.subDealer.Requery
> DoEvents

> This seemed to have solved the problem. The text box got updated with the
> item's ID and the sub-form got populated with correct data.

> However, by chance, I moved another window (Notepad) over the access form,
> and when I removed that window, the textbox got changed to 'Dealer' again. I
> repeat this process many more times, while the text box was displaying the
> item's id, move a window over it will change it to either 'Dealer' or
> 'UTF-8'. This is terrible. My friend said that he's already applied service
> pack 1, 1a and 2, but none of those help resolved the many issues he's got
> with Access forms.

> Anybody encountered similar problem in Access?



Tue, 06 Jul 2004 10:58:04 GMT  
 Access 2000 Form Doesn't Repaint Properly!
Had a similar problem with refresh b4, but not with a SQL backend. You could
try:

Docmd.echo False
Me.txtDealerID = Me.cmbDealer.Column(1)
DoEvents
Me.subDealer.Requery
DoEvents
Docmd.echo True

Dr Doogie


Quote:
> Hi,
> Well, UTF-8 is a string encoding method!
> Don't know where that's coming from.

> Dan Artuso, MVP


> > Found a weired problem!!!

> > My friend created a very simple access form with a sub-form.

> > It is an ADP with SQL Server database as the back end.

> > On the main form, there is a combo box linked to a table, and a text
box.
> > When the user selects an item from the combo box, the item's id should
> > appear in the text box.

> > The sub-form is based on the same table and linked to the text box on
the
> > main form.

> > So, the whole process should be that when the user selects an item from
the
> > combo box, the text box gets updated with the item's id, and the
sub-form
> > gets populated with related data.

> > There were only 2 lines in the Click event of the combo box.

> > Me.txtDealerID = Me.cmbDealer.Column(1)
> > Me.subDealer.Requery

> > So, when he tried to select an item from the combo box, the text box got
> > updated sometimes with the word "Dealer" (could be table name, or value
in
> > one of the fields in the table, but definitely not from the ID column),
and
> > sometimes with a code 'UTF-8'. We have no idea what UTF-8 means.

> > Anyway, I tried to resolve this problem by adding 2 DoEvents to the code
so
> > that it became:

> > Me.txtDealerID = Me.cmbDealer.Column(1)
> > DoEvents
> > Me.subDealer.Requery
> > DoEvents

> > This seemed to have solved the problem. The text box got updated with
the
> > item's ID and the sub-form got populated with correct data.

> > However, by chance, I moved another window (Notepad) over the access
form,
> > and when I removed that window, the textbox got changed to 'Dealer'
again. I
> > repeat this process many more times, while the text box was displaying
the
> > item's id, move a window over it will change it to either 'Dealer' or
> > 'UTF-8'. This is terrible. My friend said that he's already applied
service
> > pack 1, 1a and 2, but none of those help resolved the many issues he's
got
> > with Access forms.

> > Anybody encountered similar problem in Access?



Tue, 06 Jul 2004 22:53:41 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Form won't unload and repaint background properly

2. Form doesn't display properly on user's PC

3. ADO Help doesn't appear (Access 2000, Windows 2000)

4. An access 95 program doesn't work on access 2000

5. Form control doesn't repond properly?

6. Why doesn't Access always add properly?

7. CreatQueryDef In Access 2000 Doesn't Work?

8. ADO Help doesn't work from within Access 2000

9. OpenDatabase doesn't work in Access 2000

10. VBA Help doesn't function in Access 2000

11. Help: Crystal doesn't recognize access 2000 table

12. VB4-32bit Spawning doesn't repaint parent

 

 
Powered by phpBB® Forum Software