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 Programming / December 2005

Tip: Looking for answers? Try searching our database.

Not in List problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NoodNutt - 02 Dec 2005 08:33 GMT
Hi ppl,

I am using Acc2003, which I have just upgraded to from Acc97 (Finally).

I have this code in a combo which is in a subform

worked fine in Acc97, although this particular code wasn't used in a subform
configuration.

Appreciate any assistance or suggestions

TIA

Mark

Private Sub cmbContainer_NotInList(NewData As String, Response As Integer)

Dim db As DAO.Database, rs As DAO.Recordset, strMsg As String

strMsg = NewData & " is not listed !  Do you want to add it ?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Add New Container ?") = vbNo Then
   Response = acDataErrContinue
Else
   Set db = CurrentDb()
   Set rs = db.OpenRecordset("tblContainers", dbOpenDynaset)
   On Error Resume Next
   rs.AddNew
   rs!ContainerNo = NewData
   rs.Update
   If Err Then
       MsgBox "An error occurred. Please try again."
       Response = acDataErrContinue
   Else
       Response = acDataErrAdded
   End If
End If
End Sub
Douglas J Steele - 02 Dec 2005 15:40 GMT
What's the problem you're encountering?

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi ppl,
>
[quoted text clipped - 33 lines]
> End If
> End Sub
NoodNutt - 05 Dec 2005 11:09 GMT
G'day Douglas,

It is not adding the new item, 4 instance, if I add a new container no eg
AMZU0555658, and it's not in the list already displayed in the combo box,
the code should ask if I want to add it, alas it does not, first time I have
encountered this problem, it worked fine in Acc97.

Hinesight though, I have never used it on a subform, only a parent/main.

Another quirky thing about this particular combo is that when I type in a
container no, it automatically calls the first one alphabetically, by that I
mean, If I type in GCEU1111888, as soon as I type in "G", it will bring the
first "G" record, then dosn't allow me to continue typing the balance of the
container no.

Wierd one for me.

TIA.

Mark.

> What's the problem you're encountering?
>
[quoted text clipped - 38 lines]
>> End If
>> End Sub
Douglas J Steele - 05 Dec 2005 12:50 GMT
Sorry, I don't have Access 2003 installed on this machine, so I can't test
whether there's been a change in behaviour, but I think I would have
remembered if I'd encountered this problem in Access 2003!

Is this a case of an Access 97 application that you converted to Access
2003, or are you building a new application in Access 2003, and you're
copying the code you used previously in Access 97? The reason I'm asking is
because you may have forgotten to set the combobox up properly (setting its
LimitToList property to Yes)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> G'day Douglas,
>
[quoted text clipped - 59 lines]
> >> End If
> >> End Sub
NoodNutt - 06 Dec 2005 07:34 GMT
That fixed that prob, thx heaps Douglas & David

But I still have the problem of the cursor going all the way to the right
after I have entered the first Alpha and displaying the first matching alpha
record.

Thx again

Mark

> Sorry, I don't have Access 2003 installed on this machine, so I can't test
> whether there's been a change in behaviour, but I think I would have
[quoted text clipped - 77 lines]
>> >> End If
>> >> End Sub
Douglas J Steele - 06 Dec 2005 11:59 GMT
You should be able to continue typing, even if it's matched an entry. If
not, try backspacing.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> That fixed that prob, thx heaps Douglas & David
>
[quoted text clipped - 87 lines]
> >> >> End If
> >> >> End Sub
NoodNutt - 07 Dec 2005 08:40 GMT
Douglas & David

David, yep, I fixed the LimitToList problem thanks.

Douglas, I am actually doing that now, though I have never had to in the
past, so I have no idead what is different in this instance. Generally, in
the past, I could continue typing over the top of whatever displayed whilst
matching data was inputted.

Also, I screwed up, although I am using Off20003, I noticed that the DB's
are in Acc2000 format, which is another thing I don't understand.

Will it have something to do with the jetengine?

Thanx heaps again guy's

Reg's
Mark.
> You should be able to continue typing, even if it's matched an entry. If
> not, try backspacing.
[quoted text clipped - 103 lines]
>> >> >> End If
>> >> >> End Sub
Douglas J Steele - 07 Dec 2005 12:42 GMT
The default file format for Access 2003 (and Access 2002, for that matter)
is the Access 2000 format. This is to maximize the interoperability of the
database.

You can convert a single database to the new format under Tools | Database
Utilities, or you can change your default to use the new format (I think
it's under Tools | Options: sorry, don't have Access 2003 installed on this
machine)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Also, I screwed up, although I am using Off20003, I noticed that the DB's
> are in Acc2000 format, which is another thing I don't understand.
NoodNutt - 09 Dec 2005 06:16 GMT
np, thx again Douglas.

Reg's
Mark.

> The default file format for Access 2003 (and Access 2002, for that matter)
> is the Access 2000 format. This is to maximize the interoperability of the
[quoted text clipped - 8 lines]
>> Also, I screwed up, although I am using Off20003, I noticed that the DB's
>> are in Acc2000 format, which is another thing I don't understand.
David C. Holley - 06 Dec 2005 13:50 GMT
Did you check the LimitToList property for the comboBox?

> That fixed that prob, thx heaps Douglas & David
>
[quoted text clipped - 97 lines]
>>>>>End If
>>>>>End Sub
David C. Holley - 05 Dec 2005 14:36 GMT
Sounds like you have the LimitToList property set to true.

> G'day Douglas,
>
[quoted text clipped - 61 lines]
>>>End If
>>>End Sub
NoodNutt - 05 Dec 2005 11:11 GMT
Additionally, It has an input mask >CCCCCCCCCCC

thought I would just mention it.

> What's the problem you're encountering?
>
[quoted text clipped - 38 lines]
>> End If
>> End Sub
 
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.