Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

nonfunctioning cbo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
atlantis43 - 15 Jul 2007 20:27 GMT
Hi;
Second time I'm asking this question, and hope someone can suggest a cure.
I'm running a form with a cbo box for data entry. I have 5 other BASICALLY
IDENTICAL cbo's on the form, all of which work fine.
My NotOnList event is as follows:

   ' Add a new policy type by typing a name in
   ' CoPolicy Type  combo box.

   Dim NewCoPolicyType As Integer, TruncateName As Integer, Title As String,
MsgDialog As Integer
   Const MB_OK = 0
   Const MB_YESNO = 4
   Const MB_ICONQUESTIONMARK = 32
   Const MB_ICONEXCLAMATION = 64
   Const MB_DEFBUTTON1 = 0, IDYES = 6, IDNO = 7
   ' Display message box asking if user wants to add a
   ' new insurer.
   Title = "Policy Type Not In List"
   MsgDialog = MB_YESNO + MB_ICONQUESTIONMARK + MB_DEFBUTTON1
   NewCoPolicyType = MsgBox("Do you want to add a new Policy Type?",
MsgDialog, Title)
   
   If NewCoPolicyType = IDYES Then

       '  Open Add Policy form.
       DoCmd.OpenForm FormName:="FPolicyTypeCo", DataMode:=acAdd, WindowMode:
=acDialog, openargs:=NewData
       '  Continue without displaying default error message.
       Response = acDataErrAdded

   End If
End Sub

When THIS PARTICULAR NotInList event fires, I am find that:
1)the cbo is not cleared of the newdata entry as the dialogue form opens (as
it does on all my other cbo's). Note, however, that the openargs ARE properly
carried to the dialogue form.
2)When the dialogue form is closed, my cbo is blank, and I get errmsg of
"item not in list".

Can anyone make any sense of why this is happening on only one of six cbos,
and  any solution you can recommend.
TIA, Richard
Bob Quintal - 16 Jul 2007 00:53 GMT
> Hi;
> Second time I'm asking this question, and hope someone can
[quoted text clipped - 43 lines]
> of six cbos, and  any solution you can recommend.
> TIA, Richard

Is there something special about this combo's row source that it
might be filtered with a bogus value, causing it to have no
records after the requery triggered by the NotInList Event?

Signature

Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

richaluft@cs.com - 16 Jul 2007 09:20 GMT
> > Hi;
> > Second time I'm asking this question, and hope someone can
[quoted text clipped - 55 lines]
> --
> Posted via a free Usenet account fromhttp://www.teranews.com

Rowsource for cbo that works PERFECTLY is:
SELECT DISTINCTROW Insurpolicy.[InsIndex#], Insurpolicy.[policy name]
FROM Insurpolicy WHERE (((Insurpolicy.[Insco#])=[Forms]!
[FINSURANCEINFO]![SelectInsco])) ORDER BY Insurpolicy.[policy name];

Rowsource for cbo that FAILS is:
SELECT DISTINCTROW Insurpolicy.[InsIndex#], Insurpolicy.[policy name]
FROM Insurpolicy WHERE (((Insurpolicy.[Insco#])=[Forms]!
[FINSURANCEINFO]![SelectCoInsco])) ORDER BY Insurpolicy.[policy name];

They both should be legitimate!
It seems that looking thru old questions in Access forums on this same
type of problem, there are people with similar problems to mine.  What
is stranger, I've never been able to find any one who seems to have
achieved a solution!
Bob Quintal - 16 Jul 2007 20:36 GMT
> On Jul 15, 7:53 pm, Bob Quintal <rquin...@sPAmpatico.ca>
> wrote:
[quoted text clipped - 80 lines]
> problems to mine.  What is stranger, I've never been able to
> find any one who seems to have achieved a solution!

The only difference I can see is the textbox on the form changes
from SelectInsco to SelectCoInsco. Correct?

Id do this for debugging.
Remove the whereClause and add the value of the field to the
Rowsource

SELECT DISTINCTROW Insurpolicy.[InsIndex#], Insurpolicy.[policy
name],[Forms]![FINSURANCEINFO]![SelectCoInsco] as test
FROM Insurpolicy ORDER BY Insurpolicy.[policy name];

Don't forget to increment the columns property.

Examine whether the form data is what it should be.

Signature

Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.