PC Review


Reply
Thread Tools Rate Thread

Combo box causes crashes

 
 
Iram
Guest
Posts: n/a
 
      6th Jun 2010
Hello,
I have many combo box's in many forms that continue to cause Access 2003 SP3
to crash.

Are there any official bugs on MS web page that describe why? If so can you
send me a couple of links.
These combobox's are pretty embarrasing and frustrating.

------------Below is the query the combo box runs, can you tell me if you
see anything wrong?

SELECT tbl_Category.Category, tbl_Category.Classification,
tbl_Category.Category, tbl_Category.Desc, tbl_Category.ReportType AS
[Category-Type], tbl_Category.[Remove Category]
FROM tbl_Category
WHERE (((tbl_Category.[Remove Category])=0))
ORDER BY tbl_Category.Classification, tbl_Category.Category;


--------Below is the On Got Focus of the same combo box...

Private Sub Category_GotFocus()
With Me
If fOSUserName() = .WorkerID Then
.Category.Locked = False
Else
.Category.Locked = True
End If
End With
End Sub



Thanks.
Iram/mcp
 
Reply With Quote
 
 
 
 
Iram
Guest
Posts: n/a
 
      6th Jun 2010
I read an article that indicates using Me. when using vba on a Combobox
causes crashes and to replace Me. with the full references to the form path,
i.e.
Private sub...
Forms![form1]![Combo2].whatever
End Sub

Since I don't know vba too well how would I re-write the following to remove
the Me stuff to full form references?


Private Sub Category_GotFocus()
With Me
If fOSUserName() = .WorkerID Then
.Category.Locked = False
Else
.Category.Locked = True
End If
End With
End Sub


Thanks.
Iram




"Iram" wrote:

> Hello,
> I have many combo box's in many forms that continue to cause Access 2003 SP3
> to crash.
>
> Are there any official bugs on MS web page that describe why? If so can you
> send me a couple of links.
> These combobox's are pretty embarrasing and frustrating.
>
> ------------Below is the query the combo box runs, can you tell me if you
> see anything wrong?
>
> SELECT tbl_Category.Category, tbl_Category.Classification,
> tbl_Category.Category, tbl_Category.Desc, tbl_Category.ReportType AS
> [Category-Type], tbl_Category.[Remove Category]
> FROM tbl_Category
> WHERE (((tbl_Category.[Remove Category])=0))
> ORDER BY tbl_Category.Classification, tbl_Category.Category;
>
>
> --------Below is the On Got Focus of the same combo box...
>
> Private Sub Category_GotFocus()
> With Me
> If fOSUserName() = .WorkerID Then
> .Category.Locked = False
> Else
> .Category.Locked = True
> End If
> End With
> End Sub
>
>
>
> Thanks.
> Iram/mcp

 
Reply With Quote
 
Jeanette Cunningham
Guest
Posts: n/a
 
      6th Jun 2010
You can run this code on the current event of the form instead of the got
focus for the combo.
I have not heard of using the full reference to the combo to avoid a crash
with SP3 before today.

Private Sub Form_Current()
With Me
If fOSUserName() = .WorkerID Then
.Category.Locked = False
Else
.Category.Locked = True
End If
End With
End Sub

If you wish to use full references,
Private Sub Form_Current()
With Forms![Form1]
If fOSUserName() = .WorkerID Then
.Category.Locked = False
Else
.Category.Locked = True
End If
End With
End Sub

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Iram" <(E-Mail Removed)> wrote in message
news:15C1C64A-9FAA-4BA6-9FAE-(E-Mail Removed)...
>I read an article that indicates using Me. when using vba on a Combobox
> causes crashes and to replace Me. with the full references to the form
> path,
> i.e.
> Private sub...
> Forms![form1]![Combo2].whatever
> End Sub
>
> Since I don't know vba too well how would I re-write the following to
> remove
> the Me stuff to full form references?
>
>
> Private Sub Category_GotFocus()
> With Me
> If fOSUserName() = .WorkerID Then
> .Category.Locked = False
> Else
> .Category.Locked = True
> End If
> End With
> End Sub
>
>
> Thanks.
> Iram
>
>
>
>
> "Iram" wrote:
>
>> Hello,
>> I have many combo box's in many forms that continue to cause Access 2003
>> SP3
>> to crash.
>>
>> Are there any official bugs on MS web page that describe why? If so can
>> you
>> send me a couple of links.
>> These combobox's are pretty embarrasing and frustrating.
>>
>> ------------Below is the query the combo box runs, can you tell me if you
>> see anything wrong?
>>
>> SELECT tbl_Category.Category, tbl_Category.Classification,
>> tbl_Category.Category, tbl_Category.Desc, tbl_Category.ReportType AS
>> [Category-Type], tbl_Category.[Remove Category]
>> FROM tbl_Category
>> WHERE (((tbl_Category.[Remove Category])=0))
>> ORDER BY tbl_Category.Classification, tbl_Category.Category;
>>
>>
>> --------Below is the On Got Focus of the same combo box...
>>
>> Private Sub Category_GotFocus()
>> With Me
>> If fOSUserName() = .WorkerID Then
>> .Category.Locked = False
>> Else
>> .Category.Locked = True
>> End If
>> End With
>> End Sub
>>
>>
>>
>> Thanks.
>> Iram/mcp



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access (XP) crashes on after update of combo box Nick X Microsoft Access Form Coding 2 4th Jun 2008 07:19 PM
Repost: Access Crashes on After Update of Combo Box NickX Microsoft Access 0 25th Apr 2008 12:45 PM
Hide bound column of combo box and access crashes Jeremy Microsoft Access Form Coding 1 20th Jul 2007 11:19 PM
Excel crashes when Combo Box loses focus ExcelEddie Microsoft Excel Programming 1 17th May 2006 08:50 PM
Access Crashes on Combo Box Selection Erica Microsoft Access Forms 1 4th Aug 2004 03:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:43 PM.