On 26 May, 17:54, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> What you're describing is correct.
>
[quoted text clipped - 17 lines]
>
> - Show quoted text -
> On 26 May, 17:54, "Douglas J. Steele"
> <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
[quoted text clipped - 14 lines]
> I am using Access 2000 and my record source is a table named Towns.
> Should I be attaching something different to these Dim statements.
Sounds as though you don't have a reference set to DAO. (Access 2000 doesn't
include one by default).
Go into the VB Editor and select Tools | References from the menu. Scroll
through the list of available references until you find the one for
Microsoft DAO 3.6 Object library, select it, then back out of the dialog.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
Mellstock - 26 May 2008 22:14 GMT
> > On 26 May, 17:54, "Douglas J. Steele"
> > <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
[quoted text clipped - 27 lines]
>
> - Show quoted text -
Thanks that helps. DAO Objects now recognised. Code sort of works. If
I enter a new town it is recognised as new, however if I click yes to
enter, it does not get entered onto form but new town appears in Towns
table ! If I press No code errors on resetting rs to nothing.
Mellstock - 26 May 2008 23:21 GMT
> On 26 May, 20:37, "Douglas J. Steele"
>
[quoted text clipped - 41 lines]
>
> - Show quoted text -
Seem to have cracked it with some help from a download
support.microsoft.com/kb/197526/en-us. Similar structure to the code
from Access Web.
Mellstock - 27 May 2008 09:39 GMT
> > On 26 May, 20:37, "Douglas J. Steele"
>
[quoted text clipped - 47 lines]
>
> - Show quoted text -
I think I am nearly there. When the form is open the code I have
written recognises a new entry and allows it to be added to the table
and Combo Box selections.
I still have a problem when I open the database and the form from
scratch I get a message saying the Table (Towns) to feed the query
cannot be found.
If I check Tables it is there and if I go into the Town field property
all appears OK.
Source Combo Box entries from an existing Table/Query and
SELECT[Towns]:[Town]FROM[Towns];
If I come out of properties back to the form the function works the
Combo Box appears including Towns added from a previous session. (ie
prior to reopening the database / form)
Douglas J. Steele - 27 May 2008 12:05 GMT
Do you really not have spaces in that SQL Statement? It should be
SELECT Town FROM Towns ORDER BY Town

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>> > On 26 May, 20:37, "Douglas J. Steele"
>>
[quoted text clipped - 71 lines]
> Combo Box appears including Towns added from a previous session. (ie
> prior to reopening the database / form)
Jan Baird - 27 May 2008 20:52 GMT
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
Jan Baird - 27 May 2008 20:52 GMT
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
Jan Baird - 27 May 2008 20:51 GMT
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
Jan Baird - 27 May 2008 20:51 GMT
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.