Generating a new Record

Can anyone help point out what i am doing wrong Please?
I want to generata a new record and I get to that point by having the user 
enter a search for a record in a Table via a combo. When the record is Found 
in the Table, no problem The user can view the Record, Edit it, etc.  When 
the record is not Found in the Table, the "not in List" event triggers the 
question "Not Found, Do You Want To Generate"? The answer "Yes" triggers the 
Code 
DoCmd.accNewRecord acForm,Me.Name,acNewRec
My Form then displays a blank series of Fields (Name Address, etc) and my 
thought proccess is to just tell the program to go into my normal "Record 
Edit Routine" to enter the information into the Blank Fields of what I think 
is the new Record. 
HOWEVER, when I look at the Table the new record is there but the 
informatiion I enter via my Edit Routine is saved in the previous Records@ 
Fields.

Its as though the new record is generated after I have edited the Previouse 
Record's Fields (though the previous record's information is not displayed 
when I am editing what i think is the new record). Am I missing something 
like "Requery"  or Append or something similar to fix the New Record as the 
New Last Record?

Everything worls fine EXCEPT when I look at the table, there is a new Record 
under the name that i originally entered but any subsequent information i 
entered into the blank Records are there BUT they are held in the previous 
records fields.
Any Help appreciated.

Regards Ray C
0
Utf
3/28/2010 5:55:01 PM
access.gettingstarted 618 articles. 1 followers. Follow

14 Replies
708 Views

Similar Articles

[PageSpeed] 56

If you're looking for generic NotInList code:

http://www.datastrat.com/Code/NotInListCode.txt

or a demo of that code is at:

http://accessmvp.com/Arvin/NotInListDemo.zip
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"Ray C" <RayC@discussions.microsoft.com> wrote in message 
news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
> Can anyone help point out what i am doing wrong Please?
> I want to generata a new record and I get to that point by having the user
> enter a search for a record in a Table via a combo. When the record is 
> Found
> in the Table, no problem The user can view the Record, Edit it, etc.  When
> the record is not Found in the Table, the "not in List" event triggers the
> question "Not Found, Do You Want To Generate"? The answer "Yes" triggers 
> the
> Code
> DoCmd.accNewRecord acForm,Me.Name,acNewRec
> My Form then displays a blank series of Fields (Name Address, etc) and my
> thought proccess is to just tell the program to go into my normal "Record
> Edit Routine" to enter the information into the Blank Fields of what I 
> think
> is the new Record.
> HOWEVER, when I look at the Table the new record is there but the
> informatiion I enter via my Edit Routine is saved in the previous Records@
> Fields.
>
> Its as though the new record is generated after I have edited the 
> Previouse
> Record's Fields (though the previous record's information is not displayed
> when I am editing what i think is the new record). Am I missing something
> like "Requery"  or Append or something similar to fix the New Record as 
> the
> New Last Record?
>
> Everything worls fine EXCEPT when I look at the table, there is a new 
> Record
> under the name that i originally entered but any subsequent information i
> entered into the blank Records are there BUT they are held in the previous
> records fields.
> Any Help appreciated.
>
> Regards Ray C 


0
Arvin
3/29/2010 1:26:19 AM
Hi Arvin, thanks for coming back to me, it is much appreciated.

I don't think that I need the generic NotinList code, I have that. I think I 
need to understand if the NotinList code will add a new record to the Table 
or of it will modify the Drop Down List only. Forgive me pleas, I get 
confused when dealing with Tables and Forms.
Thanks RayC


"Arvin Meyer [MVP]" wrote:

> If you're looking for generic NotInList code:
> 
> http://www.datastrat.com/Code/NotInListCode.txt
> 
> or a demo of that code is at:
> 
> http://accessmvp.com/Arvin/NotInListDemo.zip
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
> 
> 
> "Ray C" <RayC@discussions.microsoft.com> wrote in message 
> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
> > Can anyone help point out what i am doing wrong Please?
> > I want to generata a new record and I get to that point by having the user
> > enter a search for a record in a Table via a combo. When the record is 
> > Found
> > in the Table, no problem The user can view the Record, Edit it, etc.  When
> > the record is not Found in the Table, the "not in List" event triggers the
> > question "Not Found, Do You Want To Generate"? The answer "Yes" triggers 
> > the
> > Code
> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
> > My Form then displays a blank series of Fields (Name Address, etc) and my
> > thought proccess is to just tell the program to go into my normal "Record
> > Edit Routine" to enter the information into the Blank Fields of what I 
> > think
> > is the new Record.
> > HOWEVER, when I look at the Table the new record is there but the
> > informatiion I enter via my Edit Routine is saved in the previous Records@
> > Fields.
> >
> > Its as though the new record is generated after I have edited the 
> > Previouse
> > Record's Fields (though the previous record's information is not displayed
> > when I am editing what i think is the new record). Am I missing something
> > like "Requery"  or Append or something similar to fix the New Record as 
> > the
> > New Last Record?
> >
> > Everything worls fine EXCEPT when I look at the table, there is a new 
> > Record
> > under the name that i originally entered but any subsequent information i
> > entered into the blank Records are there BUT they are held in the previous
> > records fields.
> > Any Help appreciated.
> >
> > Regards Ray C 
> 
> 
> .
> 
0
Utf
3/29/2010 12:02:01 PM
That depends upon the constant you use:

acDataErrDisplay    -    (Default) Displays the default message to the user. 
You can use this when you don't want to allow the user to add a new value to 
the combo box list.

acDataErrContinue    -    Doesn't display the default message to the user. 
You can use this when you want to display a custom message to the user. For 
example, the event procedure could display a custom dialog box asking if the 
user wanted to save the new entry. If the response is Yes, the event 
procedure would add the new entry to the list and set the Response argument 
to acDataErrAdded. If the response is No, the event procedure would set the 
Response argument to acDataErrContinue.

acDataErrAdded     -    Doesn't display a message to the user but enables 
you to add the entry to the combo box list in the NotInList event procedure. 
After the entry is added, Microsoft Access updates the list by requerying 
the combo box. Microsoft Access then rechecks the string against the combo 
box list, and saves the value in the NewData argument in the field the combo 
box is bound to. If the string is not in the list, then Microsoft Access 
displays an error message.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"Ray C" <RayC@discussions.microsoft.com> wrote in message 
news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
> Hi Arvin, thanks for coming back to me, it is much appreciated.
>
> I don't think that I need the generic NotinList code, I have that. I think 
> I
> need to understand if the NotinList code will add a new record to the 
> Table
> or of it will modify the Drop Down List only. Forgive me pleas, I get
> confused when dealing with Tables and Forms.
> Thanks RayC
>
>
> "Arvin Meyer [MVP]" wrote:
>
>> If you're looking for generic NotInList code:
>>
>> http://www.datastrat.com/Code/NotInListCode.txt
>>
>> or a demo of that code is at:
>>
>> http://accessmvp.com/Arvin/NotInListDemo.zip
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.accessmvp.com
>> http://www.mvps.org/access
>>
>>
>> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
>> > Can anyone help point out what i am doing wrong Please?
>> > I want to generata a new record and I get to that point by having the 
>> > user
>> > enter a search for a record in a Table via a combo. When the record is
>> > Found
>> > in the Table, no problem The user can view the Record, Edit it, etc. 
>> > When
>> > the record is not Found in the Table, the "not in List" event triggers 
>> > the
>> > question "Not Found, Do You Want To Generate"? The answer "Yes" 
>> > triggers
>> > the
>> > Code
>> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
>> > My Form then displays a blank series of Fields (Name Address, etc) and 
>> > my
>> > thought proccess is to just tell the program to go into my normal 
>> > "Record
>> > Edit Routine" to enter the information into the Blank Fields of what I
>> > think
>> > is the new Record.
>> > HOWEVER, when I look at the Table the new record is there but the
>> > informatiion I enter via my Edit Routine is saved in the previous 
>> > Records@
>> > Fields.
>> >
>> > Its as though the new record is generated after I have edited the
>> > Previouse
>> > Record's Fields (though the previous record's information is not 
>> > displayed
>> > when I am editing what i think is the new record). Am I missing 
>> > something
>> > like "Requery"  or Append or something similar to fix the New Record as
>> > the
>> > New Last Record?
>> >
>> > Everything worls fine EXCEPT when I look at the table, there is a new
>> > Record
>> > under the name that i originally entered but any subsequent information 
>> > i
>> > entered into the blank Records are there BUT they are held in the 
>> > previous
>> > records fields.
>> > Any Help appreciated.
>> >
>> > Regards Ray C
>>
>>
>> .
>> 


0
Arvin
3/29/2010 4:53:31 PM
Hi Arvin, I am not sure if I explained my problem badly or if I am just too 
dumb to understand your solution but I have tried the code that you provided 
and I can not get it to generate a new Record in my Table.
Please let me try to explain my problem again and i would be pleased if you 
could give me any pointers as to where i am going wrong in my understanding 
of your answer.

I have a pretty standard table holding property information (Address etc) 
but eac property has a NameAddress info. The Table holdsname and addresswith 
the Name (normaly the Town where it is) and also a Property Number (provided 
by the Owner). The table has an "Auto Number Index" and holds other 
information about the property. Because the user may wish to search the Table 
by either the property name or the property number, I have two combo boxes 
that providr drop down's for the user to select as needed. Once the user has 
selected the  required property "Name" or the required property "Number" i 
have a ruotine that searches through the Address Table, finds the record and 
displays all the fields in that record. All of that is fine.
What I am wanting to do is for the user to be given the ability to Add a New 
Record to the Table if the information they entered in the Combo Box is not 
found in the Address Table.

My Current attempt at a sollution to this is to use the notIn List event to 
branch off to a routine that should generate a new *Blank" record that will 
be appended to the end of the adress Table, and show the user a form full of 
Blank Fields (with the exception of the information they originally searched 
for). The usr should then fill in the blank fields before saving (or 
rejecting) the "New Record" appended to the end of the Table.

As I tried to explain originally I experimented with the "DoCmd GoToRecord 
acForm, meName, acNewRec", this does generate a new Record in the Table and 
present the user with a series of blank Fields to complete but any 
information that is enterd into the blank fields is inserted into the 
previous record.

I hope that this helps.
Thanks for your patience
RayC

"Arvin Meyer [MVP]" wrote:

> That depends upon the constant you use:
> 
> acDataErrDisplay    -    (Default) Displays the default message to the user. 
> You can use this when you don't want to allow the user to add a new value to 
> the combo box list.
> 
> acDataErrContinue    -    Doesn't display the default message to the user. 
> You can use this when you want to display a custom message to the user. For 
> example, the event procedure could display a custom dialog box asking if the 
> user wanted to save the new entry. If the response is Yes, the event 
> procedure would add the new entry to the list and set the Response argument 
> to acDataErrAdded. If the response is No, the event procedure would set the 
> Response argument to acDataErrContinue.
> 
> acDataErrAdded     -    Doesn't display a message to the user but enables 
> you to add the entry to the combo box list in the NotInList event procedure. 
> After the entry is added, Microsoft Access updates the list by requerying 
> the combo box. Microsoft Access then rechecks the string against the combo 
> box list, and saves the value in the NewData argument in the field the combo 
> box is bound to. If the string is not in the list, then Microsoft Access 
> displays an error message.
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
> 
> 
> "Ray C" <RayC@discussions.microsoft.com> wrote in message 
> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
> > Hi Arvin, thanks for coming back to me, it is much appreciated.
> >
> > I don't think that I need the generic NotinList code, I have that. I think 
> > I
> > need to understand if the NotinList code will add a new record to the 
> > Table
> > or of it will modify the Drop Down List only. Forgive me pleas, I get
> > confused when dealing with Tables and Forms.
> > Thanks RayC
> >
> >
> > "Arvin Meyer [MVP]" wrote:
> >
> >> If you're looking for generic NotInList code:
> >>
> >> http://www.datastrat.com/Code/NotInListCode.txt
> >>
> >> or a demo of that code is at:
> >>
> >> http://accessmvp.com/Arvin/NotInListDemo.zip
> >> -- 
> >> Arvin Meyer, MCP, MVP
> >> http://www.datastrat.com
> >> http://www.accessmvp.com
> >> http://www.mvps.org/access
> >>
> >>
> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
> >> > Can anyone help point out what i am doing wrong Please?
> >> > I want to generata a new record and I get to that point by having the 
> >> > user
> >> > enter a search for a record in a Table via a combo. When the record is
> >> > Found
> >> > in the Table, no problem The user can view the Record, Edit it, etc. 
> >> > When
> >> > the record is not Found in the Table, the "not in List" event triggers 
> >> > the
> >> > question "Not Found, Do You Want To Generate"? The answer "Yes" 
> >> > triggers
> >> > the
> >> > Code
> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
> >> > My Form then displays a blank series of Fields (Name Address, etc) and 
> >> > my
> >> > thought proccess is to just tell the program to go into my normal 
> >> > "Record
> >> > Edit Routine" to enter the information into the Blank Fields of what I
> >> > think
> >> > is the new Record.
> >> > HOWEVER, when I look at the Table the new record is there but the
> >> > informatiion I enter via my Edit Routine is saved in the previous 
> >> > Records@
> >> > Fields.
> >> >
> >> > Its as though the new record is generated after I have edited the
> >> > Previouse
> >> > Record's Fields (though the previous record's information is not 
> >> > displayed
> >> > when I am editing what i think is the new record). Am I missing 
> >> > something
> >> > like "Requery"  or Append or something similar to fix the New Record as
> >> > the
> >> > New Last Record?
> >> >
> >> > Everything worls fine EXCEPT when I look at the table, there is a new
> >> > Record
> >> > under the name that i originally entered but any subsequent information 
> >> > i
> >> > entered into the blank Records are there BUT they are held in the 
> >> > previous
> >> > records fields.
> >> > Any Help appreciated.
> >> >
> >> > Regards Ray C
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
3/29/2010 8:44:10 PM
Hello Ray,

A simpler way to do what you want is to make the rowsource of both 
comboboxes a query based on your address table. Only include property "Name" 
and the required property "Number". In the query, right click in the query 
window where the address table is and click on Properties. Set Unique Values 
to Yes. Now in either combobox if the user does not find the Name or Number, 
in the drop down list, he automatically knows the address is not in the 
address table. So you provide a button near the comboboxes to open your form 
for entering new addresses in the address table. In the code for the button, 
you can have it so when the form for entering new records closes, you 
automatically requery both comboboxes so the new address will show up in 
both comboboxes.

Steve
santus@penn.com




"Ray C" <RayC@discussions.microsoft.com> wrote in message 
news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
> Hi Arvin, I am not sure if I explained my problem badly or if I am just 
> too
> dumb to understand your solution but I have tried the code that you 
> provided
> and I can not get it to generate a new Record in my Table.
> Please let me try to explain my problem again and i would be pleased if 
> you
> could give me any pointers as to where i am going wrong in my 
> understanding
> of your answer.
>
> I have a pretty standard table holding property information (Address etc)
> but eac property has a NameAddress info. The Table holdsname and 
> addresswith
> the Name (normaly the Town where it is) and also a Property Number 
> (provided
> by the Owner). The table has an "Auto Number Index" and holds other
> information about the property. Because the user may wish to search the 
> Table
> by either the property name or the property number, I have two combo boxes
> that providr drop down's for the user to select as needed. Once the user 
> has
> selected the  required property "Name" or the required property "Number" i
> have a ruotine that searches through the Address Table, finds the record 
> and
> displays all the fields in that record. All of that is fine.
> What I am wanting to do is for the user to be given the ability to Add a 
> New
> Record to the Table if the information they entered in the Combo Box is 
> not
> found in the Address Table.
>
> My Current attempt at a sollution to this is to use the notIn List event 
> to
> branch off to a routine that should generate a new *Blank" record that 
> will
> be appended to the end of the adress Table, and show the user a form full 
> of
> Blank Fields (with the exception of the information they originally 
> searched
> for). The usr should then fill in the blank fields before saving (or
> rejecting) the "New Record" appended to the end of the Table.
>
> As I tried to explain originally I experimented with the "DoCmd GoToRecord
> acForm, meName, acNewRec", this does generate a new Record in the Table 
> and
> present the user with a series of blank Fields to complete but any
> information that is enterd into the blank fields is inserted into the
> previous record.
>
> I hope that this helps.
> Thanks for your patience
> RayC
>
> "Arvin Meyer [MVP]" wrote:
>
>> That depends upon the constant you use:
>>
>> acDataErrDisplay    -    (Default) Displays the default message to the 
>> user.
>> You can use this when you don't want to allow the user to add a new value 
>> to
>> the combo box list.
>>
>> acDataErrContinue    -    Doesn't display the default message to the 
>> user.
>> You can use this when you want to display a custom message to the user. 
>> For
>> example, the event procedure could display a custom dialog box asking if 
>> the
>> user wanted to save the new entry. If the response is Yes, the event
>> procedure would add the new entry to the list and set the Response 
>> argument
>> to acDataErrAdded. If the response is No, the event procedure would set 
>> the
>> Response argument to acDataErrContinue.
>>
>> acDataErrAdded     -    Doesn't display a message to the user but enables
>> you to add the entry to the combo box list in the NotInList event 
>> procedure.
>> After the entry is added, Microsoft Access updates the list by requerying
>> the combo box. Microsoft Access then rechecks the string against the 
>> combo
>> box list, and saves the value in the NewData argument in the field the 
>> combo
>> box is bound to. If the string is not in the list, then Microsoft Access
>> displays an error message.
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.accessmvp.com
>> http://www.mvps.org/access
>>
>>
>> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
>> > Hi Arvin, thanks for coming back to me, it is much appreciated.
>> >
>> > I don't think that I need the generic NotinList code, I have that. I 
>> > think
>> > I
>> > need to understand if the NotinList code will add a new record to the
>> > Table
>> > or of it will modify the Drop Down List only. Forgive me pleas, I get
>> > confused when dealing with Tables and Forms.
>> > Thanks RayC
>> >
>> >
>> > "Arvin Meyer [MVP]" wrote:
>> >
>> >> If you're looking for generic NotInList code:
>> >>
>> >> http://www.datastrat.com/Code/NotInListCode.txt
>> >>
>> >> or a demo of that code is at:
>> >>
>> >> http://accessmvp.com/Arvin/NotInListDemo.zip
>> >> -- 
>> >> Arvin Meyer, MCP, MVP
>> >> http://www.datastrat.com
>> >> http://www.accessmvp.com
>> >> http://www.mvps.org/access
>> >>
>> >>
>> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
>> >> > Can anyone help point out what i am doing wrong Please?
>> >> > I want to generata a new record and I get to that point by having 
>> >> > the
>> >> > user
>> >> > enter a search for a record in a Table via a combo. When the record 
>> >> > is
>> >> > Found
>> >> > in the Table, no problem The user can view the Record, Edit it, etc.
>> >> > When
>> >> > the record is not Found in the Table, the "not in List" event 
>> >> > triggers
>> >> > the
>> >> > question "Not Found, Do You Want To Generate"? The answer "Yes"
>> >> > triggers
>> >> > the
>> >> > Code
>> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
>> >> > My Form then displays a blank series of Fields (Name Address, etc) 
>> >> > and
>> >> > my
>> >> > thought proccess is to just tell the program to go into my normal
>> >> > "Record
>> >> > Edit Routine" to enter the information into the Blank Fields of what 
>> >> > I
>> >> > think
>> >> > is the new Record.
>> >> > HOWEVER, when I look at the Table the new record is there but the
>> >> > informatiion I enter via my Edit Routine is saved in the previous
>> >> > Records@
>> >> > Fields.
>> >> >
>> >> > Its as though the new record is generated after I have edited the
>> >> > Previouse
>> >> > Record's Fields (though the previous record's information is not
>> >> > displayed
>> >> > when I am editing what i think is the new record). Am I missing
>> >> > something
>> >> > like "Requery"  or Append or something similar to fix the New Record 
>> >> > as
>> >> > the
>> >> > New Last Record?
>> >> >
>> >> > Everything worls fine EXCEPT when I look at the table, there is a 
>> >> > new
>> >> > Record
>> >> > under the name that i originally entered but any subsequent 
>> >> > information
>> >> > i
>> >> > entered into the blank Records are there BUT they are held in the
>> >> > previous
>> >> > records fields.
>> >> > Any Help appreciated.
>> >> >
>> >> > Regards Ray C
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Steve
3/29/2010 9:24:43 PM
Ray,

The example at:

http://accessmvp.com/Arvin/NotInListDemo.zip

is eaxctly what you want. Try importing everything into your database and 
changing all the names to fit with your names.

You won't be able to do both fields with a single combo box, so you'll need 
2 of them. I recommend getting 1 to work, then copying everything with the 
new names. The generic code function I listed is perfect for you, because 
you can make the same NotInList function work with both combo boxes.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access

"Ray C" <RayC@discussions.microsoft.com> wrote in message 
news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
> Hi Arvin, I am not sure if I explained my problem badly or if I am just 
> too
> dumb to understand your solution but I have tried the code that you 
> provided
> and I can not get it to generate a new Record in my Table.
> Please let me try to explain my problem again and i would be pleased if 
> you
> could give me any pointers as to where i am going wrong in my 
> understanding
> of your answer.
>
> I have a pretty standard table holding property information (Address etc)
> but eac property has a NameAddress info. The Table holdsname and 
> addresswith
> the Name (normaly the Town where it is) and also a Property Number 
> (provided
> by the Owner). The table has an "Auto Number Index" and holds other
> information about the property. Because the user may wish to search the 
> Table
> by either the property name or the property number, I have two combo boxes
> that providr drop down's for the user to select as needed. Once the user 
> has
> selected the  required property "Name" or the required property "Number" i
> have a ruotine that searches through the Address Table, finds the record 
> and
> displays all the fields in that record. All of that is fine.
> What I am wanting to do is for the user to be given the ability to Add a 
> New
> Record to the Table if the information they entered in the Combo Box is 
> not
> found in the Address Table.
>
> My Current attempt at a sollution to this is to use the notIn List event 
> to
> branch off to a routine that should generate a new *Blank" record that 
> will
> be appended to the end of the adress Table, and show the user a form full 
> of
> Blank Fields (with the exception of the information they originally 
> searched
> for). The usr should then fill in the blank fields before saving (or
> rejecting) the "New Record" appended to the end of the Table.
>
> As I tried to explain originally I experimented with the "DoCmd GoToRecord
> acForm, meName, acNewRec", this does generate a new Record in the Table 
> and
> present the user with a series of blank Fields to complete but any
> information that is enterd into the blank fields is inserted into the
> previous record.
>
> I hope that this helps.
> Thanks for your patience
> RayC
>
> "Arvin Meyer [MVP]" wrote:
>
>> That depends upon the constant you use:
>>
>> acDataErrDisplay    -    (Default) Displays the default message to the 
>> user.
>> You can use this when you don't want to allow the user to add a new value 
>> to
>> the combo box list.
>>
>> acDataErrContinue    -    Doesn't display the default message to the 
>> user.
>> You can use this when you want to display a custom message to the user. 
>> For
>> example, the event procedure could display a custom dialog box asking if 
>> the
>> user wanted to save the new entry. If the response is Yes, the event
>> procedure would add the new entry to the list and set the Response 
>> argument
>> to acDataErrAdded. If the response is No, the event procedure would set 
>> the
>> Response argument to acDataErrContinue.
>>
>> acDataErrAdded     -    Doesn't display a message to the user but enables
>> you to add the entry to the combo box list in the NotInList event 
>> procedure.
>> After the entry is added, Microsoft Access updates the list by requerying
>> the combo box. Microsoft Access then rechecks the string against the 
>> combo
>> box list, and saves the value in the NewData argument in the field the 
>> combo
>> box is bound to. If the string is not in the list, then Microsoft Access
>> displays an error message.
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.accessmvp.com
>> http://www.mvps.org/access
>>
>>
>> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
>> > Hi Arvin, thanks for coming back to me, it is much appreciated.
>> >
>> > I don't think that I need the generic NotinList code, I have that. I 
>> > think
>> > I
>> > need to understand if the NotinList code will add a new record to the
>> > Table
>> > or of it will modify the Drop Down List only. Forgive me pleas, I get
>> > confused when dealing with Tables and Forms.
>> > Thanks RayC
>> >
>> >
>> > "Arvin Meyer [MVP]" wrote:
>> >
>> >> If you're looking for generic NotInList code:
>> >>
>> >> http://www.datastrat.com/Code/NotInListCode.txt
>> >>
>> >> or a demo of that code is at:
>> >>
>> >> http://accessmvp.com/Arvin/NotInListDemo.zip
>> >> -- 
>> >> Arvin Meyer, MCP, MVP
>> >> http://www.datastrat.com
>> >> http://www.accessmvp.com
>> >> http://www.mvps.org/access
>> >>
>> >>
>> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
>> >> > Can anyone help point out what i am doing wrong Please?
>> >> > I want to generata a new record and I get to that point by having 
>> >> > the
>> >> > user
>> >> > enter a search for a record in a Table via a combo. When the record 
>> >> > is
>> >> > Found
>> >> > in the Table, no problem The user can view the Record, Edit it, etc.
>> >> > When
>> >> > the record is not Found in the Table, the "not in List" event 
>> >> > triggers
>> >> > the
>> >> > question "Not Found, Do You Want To Generate"? The answer "Yes"
>> >> > triggers
>> >> > the
>> >> > Code
>> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
>> >> > My Form then displays a blank series of Fields (Name Address, etc) 
>> >> > and
>> >> > my
>> >> > thought proccess is to just tell the program to go into my normal
>> >> > "Record
>> >> > Edit Routine" to enter the information into the Blank Fields of what 
>> >> > I
>> >> > think
>> >> > is the new Record.
>> >> > HOWEVER, when I look at the Table the new record is there but the
>> >> > informatiion I enter via my Edit Routine is saved in the previous
>> >> > Records@
>> >> > Fields.
>> >> >
>> >> > Its as though the new record is generated after I have edited the
>> >> > Previouse
>> >> > Record's Fields (though the previous record's information is not
>> >> > displayed
>> >> > when I am editing what i think is the new record). Am I missing
>> >> > something
>> >> > like "Requery"  or Append or something similar to fix the New Record 
>> >> > as
>> >> > the
>> >> > New Last Record?
>> >> >
>> >> > Everything worls fine EXCEPT when I look at the table, there is a 
>> >> > new
>> >> > Record
>> >> > under the name that i originally entered but any subsequent 
>> >> > information
>> >> > i
>> >> > entered into the blank Records are there BUT they are held in the
>> >> > previous
>> >> > records fields.
>> >> > Any Help appreciated.
>> >> >
>> >> > Regards Ray C
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Arvin
3/30/2010 1:35:22 AM
Hi Arvin
Some of the mist and gloom is starting to clear away and I think I have a 
bit of a handle on where to go here. Thank you so much for the extract of the 
working code, it helps so much.

Thanks also to Steve, his suggestion looks good also. I will while away a 
few hours over the easter weekend runing through your code and also 
incorporating Steves input.

Once again, thank you both so much.

Regards RayC

"Arvin Meyer [MVP]" wrote:

> Ray,
> 
> The example at:
> 
> http://accessmvp.com/Arvin/NotInListDemo.zip
> 
> is eaxctly what you want. Try importing everything into your database and 
> changing all the names to fit with your names.
> 
> You won't be able to do both fields with a single combo box, so you'll need 
> 2 of them. I recommend getting 1 to work, then copying everything with the 
> new names. The generic code function I listed is perfect for you, because 
> you can make the same NotInList function work with both combo boxes.
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
> 
> "Ray C" <RayC@discussions.microsoft.com> wrote in message 
> news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
> > Hi Arvin, I am not sure if I explained my problem badly or if I am just 
> > too
> > dumb to understand your solution but I have tried the code that you 
> > provided
> > and I can not get it to generate a new Record in my Table.
> > Please let me try to explain my problem again and i would be pleased if 
> > you
> > could give me any pointers as to where i am going wrong in my 
> > understanding
> > of your answer.
> >
> > I have a pretty standard table holding property information (Address etc)
> > but eac property has a NameAddress info. The Table holdsname and 
> > addresswith
> > the Name (normaly the Town where it is) and also a Property Number 
> > (provided
> > by the Owner). The table has an "Auto Number Index" and holds other
> > information about the property. Because the user may wish to search the 
> > Table
> > by either the property name or the property number, I have two combo boxes
> > that providr drop down's for the user to select as needed. Once the user 
> > has
> > selected the  required property "Name" or the required property "Number" i
> > have a ruotine that searches through the Address Table, finds the record 
> > and
> > displays all the fields in that record. All of that is fine.
> > What I am wanting to do is for the user to be given the ability to Add a 
> > New
> > Record to the Table if the information they entered in the Combo Box is 
> > not
> > found in the Address Table.
> >
> > My Current attempt at a sollution to this is to use the notIn List event 
> > to
> > branch off to a routine that should generate a new *Blank" record that 
> > will
> > be appended to the end of the adress Table, and show the user a form full 
> > of
> > Blank Fields (with the exception of the information they originally 
> > searched
> > for). The usr should then fill in the blank fields before saving (or
> > rejecting) the "New Record" appended to the end of the Table.
> >
> > As I tried to explain originally I experimented with the "DoCmd GoToRecord
> > acForm, meName, acNewRec", this does generate a new Record in the Table 
> > and
> > present the user with a series of blank Fields to complete but any
> > information that is enterd into the blank fields is inserted into the
> > previous record.
> >
> > I hope that this helps.
> > Thanks for your patience
> > RayC
> >
> > "Arvin Meyer [MVP]" wrote:
> >
> >> That depends upon the constant you use:
> >>
> >> acDataErrDisplay    -    (Default) Displays the default message to the 
> >> user.
> >> You can use this when you don't want to allow the user to add a new value 
> >> to
> >> the combo box list.
> >>
> >> acDataErrContinue    -    Doesn't display the default message to the 
> >> user.
> >> You can use this when you want to display a custom message to the user. 
> >> For
> >> example, the event procedure could display a custom dialog box asking if 
> >> the
> >> user wanted to save the new entry. If the response is Yes, the event
> >> procedure would add the new entry to the list and set the Response 
> >> argument
> >> to acDataErrAdded. If the response is No, the event procedure would set 
> >> the
> >> Response argument to acDataErrContinue.
> >>
> >> acDataErrAdded     -    Doesn't display a message to the user but enables
> >> you to add the entry to the combo box list in the NotInList event 
> >> procedure.
> >> After the entry is added, Microsoft Access updates the list by requerying
> >> the combo box. Microsoft Access then rechecks the string against the 
> >> combo
> >> box list, and saves the value in the NewData argument in the field the 
> >> combo
> >> box is bound to. If the string is not in the list, then Microsoft Access
> >> displays an error message.
> >> -- 
> >> Arvin Meyer, MCP, MVP
> >> http://www.datastrat.com
> >> http://www.accessmvp.com
> >> http://www.mvps.org/access
> >>
> >>
> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
> >> > Hi Arvin, thanks for coming back to me, it is much appreciated.
> >> >
> >> > I don't think that I need the generic NotinList code, I have that. I 
> >> > think
> >> > I
> >> > need to understand if the NotinList code will add a new record to the
> >> > Table
> >> > or of it will modify the Drop Down List only. Forgive me pleas, I get
> >> > confused when dealing with Tables and Forms.
> >> > Thanks RayC
> >> >
> >> >
> >> > "Arvin Meyer [MVP]" wrote:
> >> >
> >> >> If you're looking for generic NotInList code:
> >> >>
> >> >> http://www.datastrat.com/Code/NotInListCode.txt
> >> >>
> >> >> or a demo of that code is at:
> >> >>
> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
> >> >> -- 
> >> >> Arvin Meyer, MCP, MVP
> >> >> http://www.datastrat.com
> >> >> http://www.accessmvp.com
> >> >> http://www.mvps.org/access
> >> >>
> >> >>
> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
> >> >> > Can anyone help point out what i am doing wrong Please?
> >> >> > I want to generata a new record and I get to that point by having 
> >> >> > the
> >> >> > user
> >> >> > enter a search for a record in a Table via a combo. When the record 
> >> >> > is
> >> >> > Found
> >> >> > in the Table, no problem The user can view the Record, Edit it, etc.
> >> >> > When
> >> >> > the record is not Found in the Table, the "not in List" event 
> >> >> > triggers
> >> >> > the
> >> >> > question "Not Found, Do You Want To Generate"? The answer "Yes"
> >> >> > triggers
> >> >> > the
> >> >> > Code
> >> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
> >> >> > My Form then displays a blank series of Fields (Name Address, etc) 
> >> >> > and
> >> >> > my
> >> >> > thought proccess is to just tell the program to go into my normal
> >> >> > "Record
> >> >> > Edit Routine" to enter the information into the Blank Fields of what 
> >> >> > I
> >> >> > think
> >> >> > is the new Record.
> >> >> > HOWEVER, when I look at the Table the new record is there but the
> >> >> > informatiion I enter via my Edit Routine is saved in the previous
> >> >> > Records@
> >> >> > Fields.
> >> >> >
> >> >> > Its as though the new record is generated after I have edited the
> >> >> > Previouse
> >> >> > Record's Fields (though the previous record's information is not
> >> >> > displayed
> >> >> > when I am editing what i think is the new record). Am I missing
> >> >> > something
> >> >> > like "Requery"  or Append or something similar to fix the New Record 
> >> >> > as
> >> >> > the
> >> >> > New Last Record?
> >> >> >
> >> >> > Everything worls fine EXCEPT when I look at the table, there is a 
> >> >> > new
> >> >> > Record
> >> >> > under the name that i originally entered but any subsequent 
> >> >> > information
> >> >> > i
> >> >> > entered into the blank Records are there BUT they are held in the
> >> >> > previous
> >> >> > records fields.
> >> >> > Any Help appreciated.
> >> >> >
> >> >> > Regards Ray C
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
3/30/2010 7:58:01 PM
Ray,

If you do what I suggested, you do not need any Not In List code!!

Steve


"Ray C" <RayC@discussions.microsoft.com> wrote in message 
news:FDBEFC1C-2C8C-4E11-B650-0EF79AD0B6E0@microsoft.com...
> Hi Arvin
> Some of the mist and gloom is starting to clear away and I think I have a
> bit of a handle on where to go here. Thank you so much for the extract of 
> the
> working code, it helps so much.
>
> Thanks also to Steve, his suggestion looks good also. I will while away a
> few hours over the easter weekend runing through your code and also
> incorporating Steves input.
>
> Once again, thank you both so much.
>
> Regards RayC
>
> "Arvin Meyer [MVP]" wrote:
>
>> Ray,
>>
>> The example at:
>>
>> http://accessmvp.com/Arvin/NotInListDemo.zip
>>
>> is eaxctly what you want. Try importing everything into your database and
>> changing all the names to fit with your names.
>>
>> You won't be able to do both fields with a single combo box, so you'll 
>> need
>> 2 of them. I recommend getting 1 to work, then copying everything with 
>> the
>> new names. The generic code function I listed is perfect for you, because
>> you can make the same NotInList function work with both combo boxes.
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.accessmvp.com
>> http://www.mvps.org/access
>>
>> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
>> > Hi Arvin, I am not sure if I explained my problem badly or if I am just
>> > too
>> > dumb to understand your solution but I have tried the code that you
>> > provided
>> > and I can not get it to generate a new Record in my Table.
>> > Please let me try to explain my problem again and i would be pleased if
>> > you
>> > could give me any pointers as to where i am going wrong in my
>> > understanding
>> > of your answer.
>> >
>> > I have a pretty standard table holding property information (Address 
>> > etc)
>> > but eac property has a NameAddress info. The Table holdsname and
>> > addresswith
>> > the Name (normaly the Town where it is) and also a Property Number
>> > (provided
>> > by the Owner). The table has an "Auto Number Index" and holds other
>> > information about the property. Because the user may wish to search the
>> > Table
>> > by either the property name or the property number, I have two combo 
>> > boxes
>> > that providr drop down's for the user to select as needed. Once the 
>> > user
>> > has
>> > selected the  required property "Name" or the required property 
>> > "Number" i
>> > have a ruotine that searches through the Address Table, finds the 
>> > record
>> > and
>> > displays all the fields in that record. All of that is fine.
>> > What I am wanting to do is for the user to be given the ability to Add 
>> > a
>> > New
>> > Record to the Table if the information they entered in the Combo Box is
>> > not
>> > found in the Address Table.
>> >
>> > My Current attempt at a sollution to this is to use the notIn List 
>> > event
>> > to
>> > branch off to a routine that should generate a new *Blank" record that
>> > will
>> > be appended to the end of the adress Table, and show the user a form 
>> > full
>> > of
>> > Blank Fields (with the exception of the information they originally
>> > searched
>> > for). The usr should then fill in the blank fields before saving (or
>> > rejecting) the "New Record" appended to the end of the Table.
>> >
>> > As I tried to explain originally I experimented with the "DoCmd 
>> > GoToRecord
>> > acForm, meName, acNewRec", this does generate a new Record in the Table
>> > and
>> > present the user with a series of blank Fields to complete but any
>> > information that is enterd into the blank fields is inserted into the
>> > previous record.
>> >
>> > I hope that this helps.
>> > Thanks for your patience
>> > RayC
>> >
>> > "Arvin Meyer [MVP]" wrote:
>> >
>> >> That depends upon the constant you use:
>> >>
>> >> acDataErrDisplay    -    (Default) Displays the default message to the
>> >> user.
>> >> You can use this when you don't want to allow the user to add a new 
>> >> value
>> >> to
>> >> the combo box list.
>> >>
>> >> acDataErrContinue    -    Doesn't display the default message to the
>> >> user.
>> >> You can use this when you want to display a custom message to the 
>> >> user.
>> >> For
>> >> example, the event procedure could display a custom dialog box asking 
>> >> if
>> >> the
>> >> user wanted to save the new entry. If the response is Yes, the event
>> >> procedure would add the new entry to the list and set the Response
>> >> argument
>> >> to acDataErrAdded. If the response is No, the event procedure would 
>> >> set
>> >> the
>> >> Response argument to acDataErrContinue.
>> >>
>> >> acDataErrAdded     -    Doesn't display a message to the user but 
>> >> enables
>> >> you to add the entry to the combo box list in the NotInList event
>> >> procedure.
>> >> After the entry is added, Microsoft Access updates the list by 
>> >> requerying
>> >> the combo box. Microsoft Access then rechecks the string against the
>> >> combo
>> >> box list, and saves the value in the NewData argument in the field the
>> >> combo
>> >> box is bound to. If the string is not in the list, then Microsoft 
>> >> Access
>> >> displays an error message.
>> >> -- 
>> >> Arvin Meyer, MCP, MVP
>> >> http://www.datastrat.com
>> >> http://www.accessmvp.com
>> >> http://www.mvps.org/access
>> >>
>> >>
>> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
>> >> > Hi Arvin, thanks for coming back to me, it is much appreciated.
>> >> >
>> >> > I don't think that I need the generic NotinList code, I have that. I
>> >> > think
>> >> > I
>> >> > need to understand if the NotinList code will add a new record to 
>> >> > the
>> >> > Table
>> >> > or of it will modify the Drop Down List only. Forgive me pleas, I 
>> >> > get
>> >> > confused when dealing with Tables and Forms.
>> >> > Thanks RayC
>> >> >
>> >> >
>> >> > "Arvin Meyer [MVP]" wrote:
>> >> >
>> >> >> If you're looking for generic NotInList code:
>> >> >>
>> >> >> http://www.datastrat.com/Code/NotInListCode.txt
>> >> >>
>> >> >> or a demo of that code is at:
>> >> >>
>> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
>> >> >> -- 
>> >> >> Arvin Meyer, MCP, MVP
>> >> >> http://www.datastrat.com
>> >> >> http://www.accessmvp.com
>> >> >> http://www.mvps.org/access
>> >> >>
>> >> >>
>> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
>> >> >> > Can anyone help point out what i am doing wrong Please?
>> >> >> > I want to generata a new record and I get to that point by having
>> >> >> > the
>> >> >> > user
>> >> >> > enter a search for a record in a Table via a combo. When the 
>> >> >> > record
>> >> >> > is
>> >> >> > Found
>> >> >> > in the Table, no problem The user can view the Record, Edit it, 
>> >> >> > etc.
>> >> >> > When
>> >> >> > the record is not Found in the Table, the "not in List" event
>> >> >> > triggers
>> >> >> > the
>> >> >> > question "Not Found, Do You Want To Generate"? The answer "Yes"
>> >> >> > triggers
>> >> >> > the
>> >> >> > Code
>> >> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
>> >> >> > My Form then displays a blank series of Fields (Name Address, 
>> >> >> > etc)
>> >> >> > and
>> >> >> > my
>> >> >> > thought proccess is to just tell the program to go into my normal
>> >> >> > "Record
>> >> >> > Edit Routine" to enter the information into the Blank Fields of 
>> >> >> > what
>> >> >> > I
>> >> >> > think
>> >> >> > is the new Record.
>> >> >> > HOWEVER, when I look at the Table the new record is there but the
>> >> >> > informatiion I enter via my Edit Routine is saved in the previous
>> >> >> > Records@
>> >> >> > Fields.
>> >> >> >
>> >> >> > Its as though the new record is generated after I have edited the
>> >> >> > Previouse
>> >> >> > Record's Fields (though the previous record's information is not
>> >> >> > displayed
>> >> >> > when I am editing what i think is the new record). Am I missing
>> >> >> > something
>> >> >> > like "Requery"  or Append or something similar to fix the New 
>> >> >> > Record
>> >> >> > as
>> >> >> > the
>> >> >> > New Last Record?
>> >> >> >
>> >> >> > Everything worls fine EXCEPT when I look at the table, there is a
>> >> >> > new
>> >> >> > Record
>> >> >> > under the name that i originally entered but any subsequent
>> >> >> > information
>> >> >> > i
>> >> >> > entered into the blank Records are there BUT they are held in the
>> >> >> > previous
>> >> >> > records fields.
>> >> >> > Any Help appreciated.
>> >> >> >
>> >> >> > Regards Ray C
>> >> >>
>> >> >>
>> >> >> .
>> >> >>
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Steve
3/30/2010 8:17:07 PM
Hi  Arvin, still struggling I am afraid. Although I now have the new record 
being added to the table correctly (using your code), I get errors when i try 
to run the requery

Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As Integer)
 
    AddToList "frm_Store_Add", "StoreName", strNewData, Response   ' Arvin 
Mayer code
       ' Me.cmb_Find_Box_3.Requery
End Sub

I have the requery in the cmb_Find_Box_3_after update event but that routine 
does not get called (though it does in your test code???)
If I enter some dats that is not in the table (more correctly the list that 
is based on the table), the NotInList routine kicks in and the program 
happilt toddles off to generate the new record (using your code). When it 
returns from that task, you will see that i have "Me.cmb_Find_Box_3.Requery. 
However when the program gets to that line I get an error that says "Run-Time 
Error 2118" "You must save thr currentit feld before you run the requery 
action"
If I take out that line, I get an error that says  "The Text you entered is 
not an item in the list"
Either way, the table shows that my New Record is added but the record does 
not show as a new item in the Combo drop Down list.
Clearly it is a problem with the requery commant but why does your test code 
work ok bur mine gives problems? I guess the answer to that is just that you 
are the expert and i am the novice.
Thanks Arvin

Ray C




"Arvin Meyer [MVP]" wrote:

> Ray,
> 
> The example at:
> 
> http://accessmvp.com/Arvin/NotInListDemo.zip
> 
> is eaxctly what you want. Try importing everything into your database and 
> changing all the names to fit with your names.
> 
> You won't be able to do both fields with a single combo box, so you'll need 
> 2 of them. I recommend getting 1 to work, then copying everything with the 
> new names. The generic code function I listed is perfect for you, because 
> you can make the same NotInList function work with both combo boxes.
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
> 
> "Ray C" <RayC@discussions.microsoft.com> wrote in message 
> news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
> > Hi Arvin, I am not sure if I explained my problem badly or if I am just 
> > too
> > dumb to understand your solution but I have tried the code that you 
> > provided
> > and I can not get it to generate a new Record in my Table.
> > Please let me try to explain my problem again and i would be pleased if 
> > you
> > could give me any pointers as to where i am going wrong in my 
> > understanding
> > of your answer.
> >
> > I have a pretty standard table holding property information (Address etc)
> > but eac property has a NameAddress info. The Table holdsname and 
> > addresswith
> > the Name (normaly the Town where it is) and also a Property Number 
> > (provided
> > by the Owner). The table has an "Auto Number Index" and holds other
> > information about the property. Because the user may wish to search the 
> > Table
> > by either the property name or the property number, I have two combo boxes
> > that providr drop down's for the user to select as needed. Once the user 
> > has
> > selected the  required property "Name" or the required property "Number" i
> > have a ruotine that searches through the Address Table, finds the record 
> > and
> > displays all the fields in that record. All of that is fine.
> > What I am wanting to do is for the user to be given the ability to Add a 
> > New
> > Record to the Table if the information they entered in the Combo Box is 
> > not
> > found in the Address Table.
> >
> > My Current attempt at a sollution to this is to use the notIn List event 
> > to
> > branch off to a routine that should generate a new *Blank" record that 
> > will
> > be appended to the end of the adress Table, and show the user a form full 
> > of
> > Blank Fields (with the exception of the information they originally 
> > searched
> > for). The usr should then fill in the blank fields before saving (or
> > rejecting) the "New Record" appended to the end of the Table.
> >
> > As I tried to explain originally I experimented with the "DoCmd GoToRecord
> > acForm, meName, acNewRec", this does generate a new Record in the Table 
> > and
> > present the user with a series of blank Fields to complete but any
> > information that is enterd into the blank fields is inserted into the
> > previous record.
> >
> > I hope that this helps.
> > Thanks for your patience
> > RayC
> >
> > "Arvin Meyer [MVP]" wrote:
> >
> >> That depends upon the constant you use:
> >>
> >> acDataErrDisplay    -    (Default) Displays the default message to the 
> >> user.
> >> You can use this when you don't want to allow the user to add a new value 
> >> to
> >> the combo box list.
> >>
> >> acDataErrContinue    -    Doesn't display the default message to the 
> >> user.
> >> You can use this when you want to display a custom message to the user. 
> >> For
> >> example, the event procedure could display a custom dialog box asking if 
> >> the
> >> user wanted to save the new entry. If the response is Yes, the event
> >> procedure would add the new entry to the list and set the Response 
> >> argument
> >> to acDataErrAdded. If the response is No, the event procedure would set 
> >> the
> >> Response argument to acDataErrContinue.
> >>
> >> acDataErrAdded     -    Doesn't display a message to the user but enables
> >> you to add the entry to the combo box list in the NotInList event 
> >> procedure.
> >> After the entry is added, Microsoft Access updates the list by requerying
> >> the combo box. Microsoft Access then rechecks the string against the 
> >> combo
> >> box list, and saves the value in the NewData argument in the field the 
> >> combo
> >> box is bound to. If the string is not in the list, then Microsoft Access
> >> displays an error message.
> >> -- 
> >> Arvin Meyer, MCP, MVP
> >> http://www.datastrat.com
> >> http://www.accessmvp.com
> >> http://www.mvps.org/access
> >>
> >>
> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
> >> > Hi Arvin, thanks for coming back to me, it is much appreciated.
> >> >
> >> > I don't think that I need the generic NotinList code, I have that. I 
> >> > think
> >> > I
> >> > need to understand if the NotinList code will add a new record to the
> >> > Table
> >> > or of it will modify the Drop Down List only. Forgive me pleas, I get
> >> > confused when dealing with Tables and Forms.
> >> > Thanks RayC
> >> >
> >> >
> >> > "Arvin Meyer [MVP]" wrote:
> >> >
> >> >> If you're looking for generic NotInList code:
> >> >>
> >> >> http://www.datastrat.com/Code/NotInListCode.txt
> >> >>
> >> >> or a demo of that code is at:
> >> >>
> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
> >> >> -- 
> >> >> Arvin Meyer, MCP, MVP
> >> >> http://www.datastrat.com
> >> >> http://www.accessmvp.com
> >> >> http://www.mvps.org/access
> >> >>
> >> >>
> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
> >> >> > Can anyone help point out what i am doing wrong Please?
> >> >> > I want to generata a new record and I get to that point by having 
> >> >> > the
> >> >> > user
> >> >> > enter a search for a record in a Table via a combo. When the record 
> >> >> > is
> >> >> > Found
> >> >> > in the Table, no problem The user can view the Record, Edit it, etc.
> >> >> > When
> >> >> > the record is not Found in the Table, the "not in List" event 
> >> >> > triggers
> >> >> > the
> >> >> > question "Not Found, Do You Want To Generate"? The answer "Yes"
> >> >> > triggers
> >> >> > the
> >> >> > Code
> >> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
> >> >> > My Form then displays a blank series of Fields (Name Address, etc) 
> >> >> > and
> >> >> > my
> >> >> > thought proccess is to just tell the program to go into my normal
> >> >> > "Record
> >> >> > Edit Routine" to enter the information into the Blank Fields of what 
> >> >> > I
> >> >> > think
> >> >> > is the new Record.
> >> >> > HOWEVER, when I look at the Table the new record is there but the
> >> >> > informatiion I enter via my Edit Routine is saved in the previous
> >> >> > Records@
> >> >> > Fields.
> >> >> >
> >> >> > Its as though the new record is generated after I have edited the
> >> >> > Previouse
> >> >> > Record's Fields (though the previous record's information is not
> >> >> > displayed
> >> >> > when I am editing what i think is the new record). Am I missing
> >> >> > something
> >> >> > like "Requery"  or Append or something similar to fix the New Record 
> >> >> > as
> >> >> > the
> >> >> > New Last Record?
> >> >> >
> >> >> > Everything worls fine EXCEPT when I look at the table, there is a 
> >> >> > new
> >> >> > Record
> >> >> > under the name that i originally entered but any subsequent 
> >> >> > information
> >> >> > i
> >> >> > entered into the blank Records are there BUT they are held in the
> >> >> > previous
> >> >> > records fields.
> >> >> > Any Help appreciated.
> >> >> >
> >> >> > Regards Ray C
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
4/5/2010 12:00:01 PM
strNewData should be NewData
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"Ray C" <RayC@discussions.microsoft.com> wrote in message 
news:42DDFD16-7D93-4309-ACBE-BE8D7B458237@microsoft.com...
> Hi  Arvin, still struggling I am afraid. Although I now have the new 
> record
> being added to the table correctly (using your code), I get errors when i 
> try
> to run the requery
>
> Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As 
> Integer)
>
>    AddToList "frm_Store_Add", "StoreName", strNewData, Response   ' Arvin
> Mayer code
>       ' Me.cmb_Find_Box_3.Requery
> End Sub
>
> I have the requery in the cmb_Find_Box_3_after update event but that 
> routine
> does not get called (though it does in your test code???)
> If I enter some dats that is not in the table (more correctly the list 
> that
> is based on the table), the NotInList routine kicks in and the program
> happilt toddles off to generate the new record (using your code). When it
> returns from that task, you will see that i have 
> "Me.cmb_Find_Box_3.Requery.
> However when the program gets to that line I get an error that says 
> "Run-Time
> Error 2118" "You must save thr currentit feld before you run the requery
> action"
> If I take out that line, I get an error that says  "The Text you entered 
> is
> not an item in the list"
> Either way, the table shows that my New Record is added but the record 
> does
> not show as a new item in the Combo drop Down list.
> Clearly it is a problem with the requery commant but why does your test 
> code
> work ok bur mine gives problems? I guess the answer to that is just that 
> you
> are the expert and i am the novice.
> Thanks Arvin
>
> Ray C
>
>
>
>
> "Arvin Meyer [MVP]" wrote:
>
>> Ray,
>>
>> The example at:
>>
>> http://accessmvp.com/Arvin/NotInListDemo.zip
>>
>> is eaxctly what you want. Try importing everything into your database and
>> changing all the names to fit with your names.
>>
>> You won't be able to do both fields with a single combo box, so you'll 
>> need
>> 2 of them. I recommend getting 1 to work, then copying everything with 
>> the
>> new names. The generic code function I listed is perfect for you, because
>> you can make the same NotInList function work with both combo boxes.
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.accessmvp.com
>> http://www.mvps.org/access
>>
>> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
>> > Hi Arvin, I am not sure if I explained my problem badly or if I am just
>> > too
>> > dumb to understand your solution but I have tried the code that you
>> > provided
>> > and I can not get it to generate a new Record in my Table.
>> > Please let me try to explain my problem again and i would be pleased if
>> > you
>> > could give me any pointers as to where i am going wrong in my
>> > understanding
>> > of your answer.
>> >
>> > I have a pretty standard table holding property information (Address 
>> > etc)
>> > but eac property has a NameAddress info. The Table holdsname and
>> > addresswith
>> > the Name (normaly the Town where it is) and also a Property Number
>> > (provided
>> > by the Owner). The table has an "Auto Number Index" and holds other
>> > information about the property. Because the user may wish to search the
>> > Table
>> > by either the property name or the property number, I have two combo 
>> > boxes
>> > that providr drop down's for the user to select as needed. Once the 
>> > user
>> > has
>> > selected the  required property "Name" or the required property 
>> > "Number" i
>> > have a ruotine that searches through the Address Table, finds the 
>> > record
>> > and
>> > displays all the fields in that record. All of that is fine.
>> > What I am wanting to do is for the user to be given the ability to Add 
>> > a
>> > New
>> > Record to the Table if the information they entered in the Combo Box is
>> > not
>> > found in the Address Table.
>> >
>> > My Current attempt at a sollution to this is to use the notIn List 
>> > event
>> > to
>> > branch off to a routine that should generate a new *Blank" record that
>> > will
>> > be appended to the end of the adress Table, and show the user a form 
>> > full
>> > of
>> > Blank Fields (with the exception of the information they originally
>> > searched
>> > for). The usr should then fill in the blank fields before saving (or
>> > rejecting) the "New Record" appended to the end of the Table.
>> >
>> > As I tried to explain originally I experimented with the "DoCmd 
>> > GoToRecord
>> > acForm, meName, acNewRec", this does generate a new Record in the Table
>> > and
>> > present the user with a series of blank Fields to complete but any
>> > information that is enterd into the blank fields is inserted into the
>> > previous record.
>> >
>> > I hope that this helps.
>> > Thanks for your patience
>> > RayC
>> >
>> > "Arvin Meyer [MVP]" wrote:
>> >
>> >> That depends upon the constant you use:
>> >>
>> >> acDataErrDisplay    -    (Default) Displays the default message to the
>> >> user.
>> >> You can use this when you don't want to allow the user to add a new 
>> >> value
>> >> to
>> >> the combo box list.
>> >>
>> >> acDataErrContinue    -    Doesn't display the default message to the
>> >> user.
>> >> You can use this when you want to display a custom message to the 
>> >> user.
>> >> For
>> >> example, the event procedure could display a custom dialog box asking 
>> >> if
>> >> the
>> >> user wanted to save the new entry. If the response is Yes, the event
>> >> procedure would add the new entry to the list and set the Response
>> >> argument
>> >> to acDataErrAdded. If the response is No, the event procedure would 
>> >> set
>> >> the
>> >> Response argument to acDataErrContinue.
>> >>
>> >> acDataErrAdded     -    Doesn't display a message to the user but 
>> >> enables
>> >> you to add the entry to the combo box list in the NotInList event
>> >> procedure.
>> >> After the entry is added, Microsoft Access updates the list by 
>> >> requerying
>> >> the combo box. Microsoft Access then rechecks the string against the
>> >> combo
>> >> box list, and saves the value in the NewData argument in the field the
>> >> combo
>> >> box is bound to. If the string is not in the list, then Microsoft 
>> >> Access
>> >> displays an error message.
>> >> -- 
>> >> Arvin Meyer, MCP, MVP
>> >> http://www.datastrat.com
>> >> http://www.accessmvp.com
>> >> http://www.mvps.org/access
>> >>
>> >>
>> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
>> >> > Hi Arvin, thanks for coming back to me, it is much appreciated.
>> >> >
>> >> > I don't think that I need the generic NotinList code, I have that. I
>> >> > think
>> >> > I
>> >> > need to understand if the NotinList code will add a new record to 
>> >> > the
>> >> > Table
>> >> > or of it will modify the Drop Down List only. Forgive me pleas, I 
>> >> > get
>> >> > confused when dealing with Tables and Forms.
>> >> > Thanks RayC
>> >> >
>> >> >
>> >> > "Arvin Meyer [MVP]" wrote:
>> >> >
>> >> >> If you're looking for generic NotInList code:
>> >> >>
>> >> >> http://www.datastrat.com/Code/NotInListCode.txt
>> >> >>
>> >> >> or a demo of that code is at:
>> >> >>
>> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
>> >> >> -- 
>> >> >> Arvin Meyer, MCP, MVP
>> >> >> http://www.datastrat.com
>> >> >> http://www.accessmvp.com
>> >> >> http://www.mvps.org/access
>> >> >>
>> >> >>
>> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
>> >> >> > Can anyone help point out what i am doing wrong Please?
>> >> >> > I want to generata a new record and I get to that point by having
>> >> >> > the
>> >> >> > user
>> >> >> > enter a search for a record in a Table via a combo. When the 
>> >> >> > record
>> >> >> > is
>> >> >> > Found
>> >> >> > in the Table, no problem The user can view the Record, Edit it, 
>> >> >> > etc.
>> >> >> > When
>> >> >> > the record is not Found in the Table, the "not in List" event
>> >> >> > triggers
>> >> >> > the
>> >> >> > question "Not Found, Do You Want To Generate"? The answer "Yes"
>> >> >> > triggers
>> >> >> > the
>> >> >> > Code
>> >> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
>> >> >> > My Form then displays a blank series of Fields (Name Address, 
>> >> >> > etc)
>> >> >> > and
>> >> >> > my
>> >> >> > thought proccess is to just tell the program to go into my normal
>> >> >> > "Record
>> >> >> > Edit Routine" to enter the information into the Blank Fields of 
>> >> >> > what
>> >> >> > I
>> >> >> > think
>> >> >> > is the new Record.
>> >> >> > HOWEVER, when I look at the Table the new record is there but the
>> >> >> > informatiion I enter via my Edit Routine is saved in the previous
>> >> >> > Records@
>> >> >> > Fields.
>> >> >> >
>> >> >> > Its as though the new record is generated after I have edited the
>> >> >> > Previouse
>> >> >> > Record's Fields (though the previous record's information is not
>> >> >> > displayed
>> >> >> > when I am editing what i think is the new record). Am I missing
>> >> >> > something
>> >> >> > like "Requery"  or Append or something similar to fix the New 
>> >> >> > Record
>> >> >> > as
>> >> >> > the
>> >> >> > New Last Record?
>> >> >> >
>> >> >> > Everything worls fine EXCEPT when I look at the table, there is a
>> >> >> > new
>> >> >> > Record
>> >> >> > under the name that i originally entered but any subsequent
>> >> >> > information
>> >> >> > i
>> >> >> > entered into the blank Records are there BUT they are held in the
>> >> >> > previous
>> >> >> > records fields.
>> >> >> > Any Help appreciated.
>> >> >> >
>> >> >> > Regards Ray C
>> >> >>
>> >> >>
>> >> >> .
>> >> >>
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Arvin
4/7/2010 12:39:43 AM
Hi Arvin, Sorry for my Typo leading you astray, the code is "New Data" and 
not "strNewData". in either event, the new data that is not currently a 
record is passed to the form that you open in your code and does get appended 
to the table as a new record. My issie is with the Requery command and where 
that goes. as I tried nto explain in the body of my last message. I seem to 
get errors wherever I put the "Requery" comand and without running "Requery" 
somewhere after closing the form that is used to enter the new record 
information, the new information (that is in the table) is not shown in the 
combo box.

Hope that this makes sense.

Ray C

"Arvin Meyer [MVP]" wrote:

> strNewData should be NewData
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
> 
> 
> "Ray C" <RayC@discussions.microsoft.com> wrote in message 
> news:42DDFD16-7D93-4309-ACBE-BE8D7B458237@microsoft.com...
> > Hi  Arvin, still struggling I am afraid. Although I now have the new 
> > record
> > being added to the table correctly (using your code), I get errors when i 
> > try
> > to run the requery
> >
> > Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As 
> > Integer)
> >
> >    AddToList "frm_Store_Add", "StoreName", strNewData, Response   ' Arvin
> > Mayer code
> >       ' Me.cmb_Find_Box_3.Requery
> > End Sub
> >
> > I have the requery in the cmb_Find_Box_3_after update event but that 
> > routine
> > does not get called (though it does in your test code???)
> > If I enter some dats that is not in the table (more correctly the list 
> > that
> > is based on the table), the NotInList routine kicks in and the program
> > happilt toddles off to generate the new record (using your code). When it
> > returns from that task, you will see that i have 
> > "Me.cmb_Find_Box_3.Requery.
> > However when the program gets to that line I get an error that says 
> > "Run-Time
> > Error 2118" "You must save thr currentit feld before you run the requery
> > action"
> > If I take out that line, I get an error that says  "The Text you entered 
> > is
> > not an item in the list"
> > Either way, the table shows that my New Record is added but the record 
> > does
> > not show as a new item in the Combo drop Down list.
> > Clearly it is a problem with the requery commant but why does your test 
> > code
> > work ok bur mine gives problems? I guess the answer to that is just that 
> > you
> > are the expert and i am the novice.
> > Thanks Arvin
> >
> > Ray C
> >
> >
> >
> >
> > "Arvin Meyer [MVP]" wrote:
> >
> >> Ray,
> >>
> >> The example at:
> >>
> >> http://accessmvp.com/Arvin/NotInListDemo.zip
> >>
> >> is eaxctly what you want. Try importing everything into your database and
> >> changing all the names to fit with your names.
> >>
> >> You won't be able to do both fields with a single combo box, so you'll 
> >> need
> >> 2 of them. I recommend getting 1 to work, then copying everything with 
> >> the
> >> new names. The generic code function I listed is perfect for you, because
> >> you can make the same NotInList function work with both combo boxes.
> >> -- 
> >> Arvin Meyer, MCP, MVP
> >> http://www.datastrat.com
> >> http://www.accessmvp.com
> >> http://www.mvps.org/access
> >>
> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
> >> > Hi Arvin, I am not sure if I explained my problem badly or if I am just
> >> > too
> >> > dumb to understand your solution but I have tried the code that you
> >> > provided
> >> > and I can not get it to generate a new Record in my Table.
> >> > Please let me try to explain my problem again and i would be pleased if
> >> > you
> >> > could give me any pointers as to where i am going wrong in my
> >> > understanding
> >> > of your answer.
> >> >
> >> > I have a pretty standard table holding property information (Address 
> >> > etc)
> >> > but eac property has a NameAddress info. The Table holdsname and
> >> > addresswith
> >> > the Name (normaly the Town where it is) and also a Property Number
> >> > (provided
> >> > by the Owner). The table has an "Auto Number Index" and holds other
> >> > information about the property. Because the user may wish to search the
> >> > Table
> >> > by either the property name or the property number, I have two combo 
> >> > boxes
> >> > that providr drop down's for the user to select as needed. Once the 
> >> > user
> >> > has
> >> > selected the  required property "Name" or the required property 
> >> > "Number" i
> >> > have a ruotine that searches through the Address Table, finds the 
> >> > record
> >> > and
> >> > displays all the fields in that record. All of that is fine.
> >> > What I am wanting to do is for the user to be given the ability to Add 
> >> > a
> >> > New
> >> > Record to the Table if the information they entered in the Combo Box is
> >> > not
> >> > found in the Address Table.
> >> >
> >> > My Current attempt at a sollution to this is to use the notIn List 
> >> > event
> >> > to
> >> > branch off to a routine that should generate a new *Blank" record that
> >> > will
> >> > be appended to the end of the adress Table, and show the user a form 
> >> > full
> >> > of
> >> > Blank Fields (with the exception of the information they originally
> >> > searched
> >> > for). The usr should then fill in the blank fields before saving (or
> >> > rejecting) the "New Record" appended to the end of the Table.
> >> >
> >> > As I tried to explain originally I experimented with the "DoCmd 
> >> > GoToRecord
> >> > acForm, meName, acNewRec", this does generate a new Record in the Table
> >> > and
> >> > present the user with a series of blank Fields to complete but any
> >> > information that is enterd into the blank fields is inserted into the
> >> > previous record.
> >> >
> >> > I hope that this helps.
> >> > Thanks for your patience
> >> > RayC
> >> >
> >> > "Arvin Meyer [MVP]" wrote:
> >> >
> >> >> That depends upon the constant you use:
> >> >>
> >> >> acDataErrDisplay    -    (Default) Displays the default message to the
> >> >> user.
> >> >> You can use this when you don't want to allow the user to add a new 
> >> >> value
> >> >> to
> >> >> the combo box list.
> >> >>
> >> >> acDataErrContinue    -    Doesn't display the default message to the
> >> >> user.
> >> >> You can use this when you want to display a custom message to the 
> >> >> user.
> >> >> For
> >> >> example, the event procedure could display a custom dialog box asking 
> >> >> if
> >> >> the
> >> >> user wanted to save the new entry. If the response is Yes, the event
> >> >> procedure would add the new entry to the list and set the Response
> >> >> argument
> >> >> to acDataErrAdded. If the response is No, the event procedure would 
> >> >> set
> >> >> the
> >> >> Response argument to acDataErrContinue.
> >> >>
> >> >> acDataErrAdded     -    Doesn't display a message to the user but 
> >> >> enables
> >> >> you to add the entry to the combo box list in the NotInList event
> >> >> procedure.
> >> >> After the entry is added, Microsoft Access updates the list by 
> >> >> requerying
> >> >> the combo box. Microsoft Access then rechecks the string against the
> >> >> combo
> >> >> box list, and saves the value in the NewData argument in the field the
> >> >> combo
> >> >> box is bound to. If the string is not in the list, then Microsoft 
> >> >> Access
> >> >> displays an error message.
> >> >> -- 
> >> >> Arvin Meyer, MCP, MVP
> >> >> http://www.datastrat.com
> >> >> http://www.accessmvp.com
> >> >> http://www.mvps.org/access
> >> >>
> >> >>
> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> >> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
> >> >> > Hi Arvin, thanks for coming back to me, it is much appreciated.
> >> >> >
> >> >> > I don't think that I need the generic NotinList code, I have that. I
> >> >> > think
> >> >> > I
> >> >> > need to understand if the NotinList code will add a new record to 
> >> >> > the
> >> >> > Table
> >> >> > or of it will modify the Drop Down List only. Forgive me pleas, I 
> >> >> > get
> >> >> > confused when dealing with Tables and Forms.
> >> >> > Thanks RayC
> >> >> >
> >> >> >
> >> >> > "Arvin Meyer [MVP]" wrote:
> >> >> >
> >> >> >> If you're looking for generic NotInList code:
> >> >> >>
> >> >> >> http://www.datastrat.com/Code/NotInListCode.txt
> >> >> >>
> >> >> >> or a demo of that code is at:
> >> >> >>
> >> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
> >> >> >> -- 
> >> >> >> Arvin Meyer, MCP, MVP
> >> >> >> http://www.datastrat.com
> >> >> >> http://www.accessmvp.com
> >> >> >> http://www.mvps.org/access
> >> >> >>
> >> >> >>
> >> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> >> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
> >> >> >> > Can anyone help point out what i am doing wrong Please?
> >> >> >> > I want to generata a new record and I get to that point by having
> >> >> >> > the
> >> >> >> > user
> >> >> >> > enter a search for a record in a Table via a combo. When the 
> >> >> >> > record
> >> >> >> > is
> >> >> >> > Found
> >> >> >> > in the Table, no problem The user can view the Record, Edit it, 
> >> >> >> > etc.
> >> >> >> > When
> >> >> >> > the record is not Found in the Table, the "not in List" event
> >> >> >> > triggers
> >> >> >> > the
> >> >> >> > question "Not Found, Do You Want To Generate"? The answer "Yes"
> >> >> >> > triggers
> >> >> >> > the
> >> >> >> > Code
> >> >> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
> >> >> >> > My Form then displays a blank series of Fields (Name Address, 
> >> >> >> > etc)
> >> >> >> > and
> >> >> >> > my
> >> >> >> > thought proccess is to just tell the program to go into my normal
> >> >> >> > "Record
> >> >> >> > Edit Routine" to enter the information into the Blank Fields of 
> >> >> >> > what
> >> >> >> > I
> >> >> >> > think
> >> >> >> > is the new Record.
> >> >> >> > HOWEVER, when I look at the Table the new record is there but the
> >> >> >> > informatiion I enter via my Edit Routine is saved in the previous
> >> >> >> > Records@
> >> >> >> > Fields.
> >> >> >> >
> >> >> >> > Its as though the new record is generated after I have edited the
> >> >> >> > Previouse
> >> >> >> > Record's Fields (though the previous record's information is not
> >> >> >> > displayed
> >> >> >> > when I am editing what i think is the new record). Am I missing
> >> >> >> > something
> >> >> >> > like "Requery"  or Append or something similar to fix the New 
> >> >> >> > Record
> >> >> >> > as
> >> >> >> > the
> >> >> >> > New Last Record?
> >> >> >> >
> >> >> >> > Everything worls fine EXCEPT when I look at the table, there is a
> >> >> >> > new
> >> >> >> > Record
> >> >> >> > under the name that i originally entered but any subsequent
> >> >> >> > information
> >> >> >> > i
> >> >> >> > entered into the blank Records are there BUT they are held in the
> >> >> >> > previous
> >> >> >> > records fields.
> >> >> >> > Any Help appreciated.
> >> >> >> >
> >> >> >> > Regards Ray C
> >> >> >>
> >> >> >>
> >> >> >> .
> >> >> >>
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
4/7/2010 11:39:01 AM
In the module there is the line:

Response = acDataErrAdded

That adds the entry into your combo box. You DO NOT need to requery the 
combo. I suggest that you use the demo code and forms at:

http://accessmvp.com/Arvin/NotInListDemo.zip

To see how it works, then copy the exact code into each of your forms and 
change the names of the form and fields to match yours. NewData and Response 
do not get changed. They are intrinsic to the code.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access

"Ray C" <RayC@discussions.microsoft.com> wrote in message 
news:01582ABB-25BD-47E0-854E-5E378D79CDD9@microsoft.com...
> Hi Arvin, Sorry for my Typo leading you astray, the code is "New Data" and
> not "strNewData". in either event, the new data that is not currently a
> record is passed to the form that you open in your code and does get 
> appended
> to the table as a new record. My issie is with the Requery command and 
> where
> that goes. as I tried nto explain in the body of my last message. I seem 
> to
> get errors wherever I put the "Requery" comand and without running 
> "Requery"
> somewhere after closing the form that is used to enter the new record
> information, the new information (that is in the table) is not shown in 
> the
> combo box.
>
> Hope that this makes sense.
>
> Ray C
>
> "Arvin Meyer [MVP]" wrote:
>
>> strNewData should be NewData
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.accessmvp.com
>> http://www.mvps.org/access
>>
>>
>> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> news:42DDFD16-7D93-4309-ACBE-BE8D7B458237@microsoft.com...
>> > Hi  Arvin, still struggling I am afraid. Although I now have the new
>> > record
>> > being added to the table correctly (using your code), I get errors when 
>> > i
>> > try
>> > to run the requery
>> >
>> > Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As
>> > Integer)
>> >
>> >    AddToList "frm_Store_Add", "StoreName", strNewData, Response   ' 
>> > Arvin
>> > Mayer code
>> >       ' Me.cmb_Find_Box_3.Requery
>> > End Sub
>> >
>> > I have the requery in the cmb_Find_Box_3_after update event but that
>> > routine
>> > does not get called (though it does in your test code???)
>> > If I enter some dats that is not in the table (more correctly the list
>> > that
>> > is based on the table), the NotInList routine kicks in and the program
>> > happilt toddles off to generate the new record (using your code). When 
>> > it
>> > returns from that task, you will see that i have
>> > "Me.cmb_Find_Box_3.Requery.
>> > However when the program gets to that line I get an error that says
>> > "Run-Time
>> > Error 2118" "You must save thr currentit feld before you run the 
>> > requery
>> > action"
>> > If I take out that line, I get an error that says  "The Text you 
>> > entered
>> > is
>> > not an item in the list"
>> > Either way, the table shows that my New Record is added but the record
>> > does
>> > not show as a new item in the Combo drop Down list.
>> > Clearly it is a problem with the requery commant but why does your test
>> > code
>> > work ok bur mine gives problems? I guess the answer to that is just 
>> > that
>> > you
>> > are the expert and i am the novice.
>> > Thanks Arvin
>> >
>> > Ray C
>> >
>> >
>> >
>> >
>> > "Arvin Meyer [MVP]" wrote:
>> >
>> >> Ray,
>> >>
>> >> The example at:
>> >>
>> >> http://accessmvp.com/Arvin/NotInListDemo.zip
>> >>
>> >> is eaxctly what you want. Try importing everything into your database 
>> >> and
>> >> changing all the names to fit with your names.
>> >>
>> >> You won't be able to do both fields with a single combo box, so you'll
>> >> need
>> >> 2 of them. I recommend getting 1 to work, then copying everything with
>> >> the
>> >> new names. The generic code function I listed is perfect for you, 
>> >> because
>> >> you can make the same NotInList function work with both combo boxes.
>> >> -- 
>> >> Arvin Meyer, MCP, MVP
>> >> http://www.datastrat.com
>> >> http://www.accessmvp.com
>> >> http://www.mvps.org/access
>> >>
>> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
>> >> > Hi Arvin, I am not sure if I explained my problem badly or if I am 
>> >> > just
>> >> > too
>> >> > dumb to understand your solution but I have tried the code that you
>> >> > provided
>> >> > and I can not get it to generate a new Record in my Table.
>> >> > Please let me try to explain my problem again and i would be pleased 
>> >> > if
>> >> > you
>> >> > could give me any pointers as to where i am going wrong in my
>> >> > understanding
>> >> > of your answer.
>> >> >
>> >> > I have a pretty standard table holding property information (Address
>> >> > etc)
>> >> > but eac property has a NameAddress info. The Table holdsname and
>> >> > addresswith
>> >> > the Name (normaly the Town where it is) and also a Property Number
>> >> > (provided
>> >> > by the Owner). The table has an "Auto Number Index" and holds other
>> >> > information about the property. Because the user may wish to search 
>> >> > the
>> >> > Table
>> >> > by either the property name or the property number, I have two combo
>> >> > boxes
>> >> > that providr drop down's for the user to select as needed. Once the
>> >> > user
>> >> > has
>> >> > selected the  required property "Name" or the required property
>> >> > "Number" i
>> >> > have a ruotine that searches through the Address Table, finds the
>> >> > record
>> >> > and
>> >> > displays all the fields in that record. All of that is fine.
>> >> > What I am wanting to do is for the user to be given the ability to 
>> >> > Add
>> >> > a
>> >> > New
>> >> > Record to the Table if the information they entered in the Combo Box 
>> >> > is
>> >> > not
>> >> > found in the Address Table.
>> >> >
>> >> > My Current attempt at a sollution to this is to use the notIn List
>> >> > event
>> >> > to
>> >> > branch off to a routine that should generate a new *Blank" record 
>> >> > that
>> >> > will
>> >> > be appended to the end of the adress Table, and show the user a form
>> >> > full
>> >> > of
>> >> > Blank Fields (with the exception of the information they originally
>> >> > searched
>> >> > for). The usr should then fill in the blank fields before saving (or
>> >> > rejecting) the "New Record" appended to the end of the Table.
>> >> >
>> >> > As I tried to explain originally I experimented with the "DoCmd
>> >> > GoToRecord
>> >> > acForm, meName, acNewRec", this does generate a new Record in the 
>> >> > Table
>> >> > and
>> >> > present the user with a series of blank Fields to complete but any
>> >> > information that is enterd into the blank fields is inserted into 
>> >> > the
>> >> > previous record.
>> >> >
>> >> > I hope that this helps.
>> >> > Thanks for your patience
>> >> > RayC
>> >> >
>> >> > "Arvin Meyer [MVP]" wrote:
>> >> >
>> >> >> That depends upon the constant you use:
>> >> >>
>> >> >> acDataErrDisplay    -    (Default) Displays the default message to 
>> >> >> the
>> >> >> user.
>> >> >> You can use this when you don't want to allow the user to add a new
>> >> >> value
>> >> >> to
>> >> >> the combo box list.
>> >> >>
>> >> >> acDataErrContinue    -    Doesn't display the default message to 
>> >> >> the
>> >> >> user.
>> >> >> You can use this when you want to display a custom message to the
>> >> >> user.
>> >> >> For
>> >> >> example, the event procedure could display a custom dialog box 
>> >> >> asking
>> >> >> if
>> >> >> the
>> >> >> user wanted to save the new entry. If the response is Yes, the 
>> >> >> event
>> >> >> procedure would add the new entry to the list and set the Response
>> >> >> argument
>> >> >> to acDataErrAdded. If the response is No, the event procedure would
>> >> >> set
>> >> >> the
>> >> >> Response argument to acDataErrContinue.
>> >> >>
>> >> >> acDataErrAdded     -    Doesn't display a message to the user but
>> >> >> enables
>> >> >> you to add the entry to the combo box list in the NotInList event
>> >> >> procedure.
>> >> >> After the entry is added, Microsoft Access updates the list by
>> >> >> requerying
>> >> >> the combo box. Microsoft Access then rechecks the string against 
>> >> >> the
>> >> >> combo
>> >> >> box list, and saves the value in the NewData argument in the field 
>> >> >> the
>> >> >> combo
>> >> >> box is bound to. If the string is not in the list, then Microsoft
>> >> >> Access
>> >> >> displays an error message.
>> >> >> -- 
>> >> >> Arvin Meyer, MCP, MVP
>> >> >> http://www.datastrat.com
>> >> >> http://www.accessmvp.com
>> >> >> http://www.mvps.org/access
>> >> >>
>> >> >>
>> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> >> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
>> >> >> > Hi Arvin, thanks for coming back to me, it is much appreciated.
>> >> >> >
>> >> >> > I don't think that I need the generic NotinList code, I have 
>> >> >> > that. I
>> >> >> > think
>> >> >> > I
>> >> >> > need to understand if the NotinList code will add a new record to
>> >> >> > the
>> >> >> > Table
>> >> >> > or of it will modify the Drop Down List only. Forgive me pleas, I
>> >> >> > get
>> >> >> > confused when dealing with Tables and Forms.
>> >> >> > Thanks RayC
>> >> >> >
>> >> >> >
>> >> >> > "Arvin Meyer [MVP]" wrote:
>> >> >> >
>> >> >> >> If you're looking for generic NotInList code:
>> >> >> >>
>> >> >> >> http://www.datastrat.com/Code/NotInListCode.txt
>> >> >> >>
>> >> >> >> or a demo of that code is at:
>> >> >> >>
>> >> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
>> >> >> >> -- 
>> >> >> >> Arvin Meyer, MCP, MVP
>> >> >> >> http://www.datastrat.com
>> >> >> >> http://www.accessmvp.com
>> >> >> >> http://www.mvps.org/access
>> >> >> >>
>> >> >> >>
>> >> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> >> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
>> >> >> >> > Can anyone help point out what i am doing wrong Please?
>> >> >> >> > I want to generata a new record and I get to that point by 
>> >> >> >> > having
>> >> >> >> > the
>> >> >> >> > user
>> >> >> >> > enter a search for a record in a Table via a combo. When the
>> >> >> >> > record
>> >> >> >> > is
>> >> >> >> > Found
>> >> >> >> > in the Table, no problem The user can view the Record, Edit 
>> >> >> >> > it,
>> >> >> >> > etc.
>> >> >> >> > When
>> >> >> >> > the record is not Found in the Table, the "not in List" event
>> >> >> >> > triggers
>> >> >> >> > the
>> >> >> >> > question "Not Found, Do You Want To Generate"? The answer 
>> >> >> >> > "Yes"
>> >> >> >> > triggers
>> >> >> >> > the
>> >> >> >> > Code
>> >> >> >> > DoCmd.accNewRecord acForm,Me.Name,acNewRec
>> >> >> >> > My Form then displays a blank series of Fields (Name Address,
>> >> >> >> > etc)
>> >> >> >> > and
>> >> >> >> > my
>> >> >> >> > thought proccess is to just tell the program to go into my 
>> >> >> >> > normal
>> >> >> >> > "Record
>> >> >> >> > Edit Routine" to enter the information into the Blank Fields 
>> >> >> >> > of
>> >> >> >> > what
>> >> >> >> > I
>> >> >> >> > think
>> >> >> >> > is the new Record.
>> >> >> >> > HOWEVER, when I look at the Table the new record is there but 
>> >> >> >> > the
>> >> >> >> > informatiion I enter via my Edit Routine is saved in the 
>> >> >> >> > previous
>> >> >> >> > Records@
>> >> >> >> > Fields.
>> >> >> >> >
>> >> >> >> > Its as though the new record is generated after I have edited 
>> >> >> >> > the
>> >> >> >> > Previouse
>> >> >> >> > Record's Fields (though the previous record's information is 
>> >> >> >> > not
>> >> >> >> > displayed
>> >> >> >> > when I am editing what i think is the new record). Am I 
>> >> >> >> > missing
>> >> >> >> > something
>> >> >> >> > like "Requery"  or Append or something similar to fix the New
>> >> >> >> > Record
>> >> >> >> > as
>> >> >> >> > the
>> >> >> >> > New Last Record?
>> >> >> >> >
>> >> >> >> > Everything worls fine EXCEPT when I look at the table, there 
>> >> >> >> > is a
>> >> >> >> > new
>> >> >> >> > Record
>> >> >> >> > under the name that i originally entered but any subsequent
>> >> >> >> > information
>> >> >> >> > i
>> >> >> >> > entered into the blank Records are there BUT they are held in 
>> >> >> >> > the
>> >> >> >> > previous
>> >> >> >> > records fields.
>> >> >> >> > Any Help appreciated.
>> >> >> >> >
>> >> >> >> > Regards Ray C
>> >> >> >>
>> >> >> >>
>> >> >> >> .
>> >> >> >>
>> >> >>
>> >> >>
>> >> >> .
>> >> >>
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Arvin
4/7/2010 3:37:22 PM
Hi Arvin
In your demo code, you have the sub

Private Sub cmb_Find_Box_3_AfterUpdate()

    Me.cmb_Find_Box_3.Requery
 
End Sub
in your "frmEvents" (I changed the name of the Combo Box to fit my code)
When I integrated your code into mine. I found that the Record was generated 
in the table OK but I could not find the record afterwards using my normal 
enquiry.
What I needed to do was to shut down and re open the whole database and only 
then could I find the new record with my enquiry.

What I have done is tto add the following line
 
Private Sub cmb_Find_Box_3_AfterUpdate()

    Me.cmb_Find_Box_3.Requery
    ME.Requery
End Sub
and this seems to have sorted the problem out. Does this sound right to you?

Thanks and regards RayC


"Arvin Meyer [MVP]" wrote:

> In the module there is the line:
> 
> Response = acDataErrAdded
> 
> That adds the entry into your combo box. You DO NOT need to requery the 
> combo. I suggest that you use the demo code and forms at:
> 
> http://accessmvp.com/Arvin/NotInListDemo.zip
> 
> To see how it works, then copy the exact code into each of your forms and 
> change the names of the form and fields to match yours. NewData and Response 
> do not get changed. They are intrinsic to the code.
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
> 
> "Ray C" <RayC@discussions.microsoft.com> wrote in message 
> news:01582ABB-25BD-47E0-854E-5E378D79CDD9@microsoft.com...
> > Hi Arvin, Sorry for my Typo leading you astray, the code is "New Data" and
> > not "strNewData". in either event, the new data that is not currently a
> > record is passed to the form that you open in your code and does get 
> > appended
> > to the table as a new record. My issie is with the Requery command and 
> > where
> > that goes. as I tried nto explain in the body of my last message. I seem 
> > to
> > get errors wherever I put the "Requery" comand and without running 
> > "Requery"
> > somewhere after closing the form that is used to enter the new record
> > information, the new information (that is in the table) is not shown in 
> > the
> > combo box.
> >
> > Hope that this makes sense.
> >
> > Ray C
> >
> > "Arvin Meyer [MVP]" wrote:
> >
> >> strNewData should be NewData
> >> -- 
> >> Arvin Meyer, MCP, MVP
> >> http://www.datastrat.com
> >> http://www.accessmvp.com
> >> http://www.mvps.org/access
> >>
> >>
> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> news:42DDFD16-7D93-4309-ACBE-BE8D7B458237@microsoft.com...
> >> > Hi  Arvin, still struggling I am afraid. Although I now have the new
> >> > record
> >> > being added to the table correctly (using your code), I get errors when 
> >> > i
> >> > try
> >> > to run the requery
> >> >
> >> > Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As
> >> > Integer)
> >> >
> >> >    AddToList "frm_Store_Add", "StoreName", strNewData, Response   ' 
> >> > Arvin
> >> > Mayer code
> >> >       ' Me.cmb_Find_Box_3.Requery
> >> > End Sub
> >> >
> >> > I have the requery in the cmb_Find_Box_3_after update event but that
> >> > routine
> >> > does not get called (though it does in your test code???)
> >> > If I enter some dats that is not in the table (more correctly the list
> >> > that
> >> > is based on the table), the NotInList routine kicks in and the program
> >> > happilt toddles off to generate the new record (using your code). When 
> >> > it
> >> > returns from that task, you will see that i have
> >> > "Me.cmb_Find_Box_3.Requery.
> >> > However when the program gets to that line I get an error that says
> >> > "Run-Time
> >> > Error 2118" "You must save thr currentit feld before you run the 
> >> > requery
> >> > action"
> >> > If I take out that line, I get an error that says  "The Text you 
> >> > entered
> >> > is
> >> > not an item in the list"
> >> > Either way, the table shows that my New Record is added but the record
> >> > does
> >> > not show as a new item in the Combo drop Down list.
> >> > Clearly it is a problem with the requery commant but why does your test
> >> > code
> >> > work ok bur mine gives problems? I guess the answer to that is just 
> >> > that
> >> > you
> >> > are the expert and i am the novice.
> >> > Thanks Arvin
> >> >
> >> > Ray C
> >> >
> >> >
> >> >
> >> >
> >> > "Arvin Meyer [MVP]" wrote:
> >> >
> >> >> Ray,
> >> >>
> >> >> The example at:
> >> >>
> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
> >> >>
> >> >> is eaxctly what you want. Try importing everything into your database 
> >> >> and
> >> >> changing all the names to fit with your names.
> >> >>
> >> >> You won't be able to do both fields with a single combo box, so you'll
> >> >> need
> >> >> 2 of them. I recommend getting 1 to work, then copying everything with
> >> >> the
> >> >> new names. The generic code function I listed is perfect for you, 
> >> >> because
> >> >> you can make the same NotInList function work with both combo boxes.
> >> >> -- 
> >> >> Arvin Meyer, MCP, MVP
> >> >> http://www.datastrat.com
> >> >> http://www.accessmvp.com
> >> >> http://www.mvps.org/access
> >> >>
> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> >> news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
> >> >> > Hi Arvin, I am not sure if I explained my problem badly or if I am 
> >> >> > just
> >> >> > too
> >> >> > dumb to understand your solution but I have tried the code that you
> >> >> > provided
> >> >> > and I can not get it to generate a new Record in my Table.
> >> >> > Please let me try to explain my problem again and i would be pleased 
> >> >> > if
> >> >> > you
> >> >> > could give me any pointers as to where i am going wrong in my
> >> >> > understanding
> >> >> > of your answer.
> >> >> >
> >> >> > I have a pretty standard table holding property information (Address
> >> >> > etc)
> >> >> > but eac property has a NameAddress info. The Table holdsname and
> >> >> > addresswith
> >> >> > the Name (normaly the Town where it is) and also a Property Number
> >> >> > (provided
> >> >> > by the Owner). The table has an "Auto Number Index" and holds other
> >> >> > information about the property. Because the user may wish to search 
> >> >> > the
> >> >> > Table
> >> >> > by either the property name or the property number, I have two combo
> >> >> > boxes
> >> >> > that providr drop down's for the user to select as needed. Once the
> >> >> > user
> >> >> > has
> >> >> > selected the  required property "Name" or the required property
> >> >> > "Number" i
> >> >> > have a ruotine that searches through the Address Table, finds the
> >> >> > record
> >> >> > and
> >> >> > displays all the fields in that record. All of that is fine.
> >> >> > What I am wanting to do is for the user to be given the ability to 
> >> >> > Add
> >> >> > a
> >> >> > New
> >> >> > Record to the Table if the information they entered in the Combo Box 
> >> >> > is
> >> >> > not
> >> >> > found in the Address Table.
> >> >> >
> >> >> > My Current attempt at a sollution to this is to use the notIn List
> >> >> > event
> >> >> > to
> >> >> > branch off to a routine that should generate a new *Blank" record 
> >> >> > that
> >> >> > will
> >> >> > be appended to the end of the adress Table, and show the user a form
> >> >> > full
> >> >> > of
> >> >> > Blank Fields (with the exception of the information they originally
> >> >> > searched
> >> >> > for). The usr should then fill in the blank fields before saving (or
> >> >> > rejecting) the "New Record" appended to the end of the Table.
> >> >> >
> >> >> > As I tried to explain originally I experimented with the "DoCmd
> >> >> > GoToRecord
> >> >> > acForm, meName, acNewRec", this does generate a new Record in the 
> >> >> > Table
> >> >> > and
> >> >> > present the user with a series of blank Fields to complete but any
> >> >> > information that is enterd into the blank fields is inserted into 
> >> >> > the
> >> >> > previous record.
> >> >> >
> >> >> > I hope that this helps.
> >> >> > Thanks for your patience
> >> >> > RayC
> >> >> >
> >> >> > "Arvin Meyer [MVP]" wrote:
> >> >> >
> >> >> >> That depends upon the constant you use:
> >> >> >>
> >> >> >> acDataErrDisplay    -    (Default) Displays the default message to 
> >> >> >> the
> >> >> >> user.
> >> >> >> You can use this when you don't want to allow the user to add a new
> >> >> >> value
> >> >> >> to
> >> >> >> the combo box list.
> >> >> >>
> >> >> >> acDataErrContinue    -    Doesn't display the default message to 
> >> >> >> the
> >> >> >> user.
> >> >> >> You can use this when you want to display a custom message to the
> >> >> >> user.
> >> >> >> For
> >> >> >> example, the event procedure could display a custom dialog box 
> >> >> >> asking
> >> >> >> if
> >> >> >> the
> >> >> >> user wanted to save the new entry. If the response is Yes, the 
> >> >> >> event
> >> >> >> procedure would add the new entry to the list and set the Response
> >> >> >> argument
> >> >> >> to acDataErrAdded. If the response is No, the event procedure would
> >> >> >> set
> >> >> >> the
> >> >> >> Response argument to acDataErrContinue.
> >> >> >>
> >> >> >> acDataErrAdded     -    Doesn't display a message to the user but
> >> >> >> enables
> >> >> >> you to add the entry to the combo box list in the NotInList event
> >> >> >> procedure.
> >> >> >> After the entry is added, Microsoft Access updates the list by
> >> >> >> requerying
> >> >> >> the combo box. Microsoft Access then rechecks the string against 
> >> >> >> the
> >> >> >> combo
> >> >> >> box list, and saves the value in the NewData argument in the field 
> >> >> >> the
> >> >> >> combo
> >> >> >> box is bound to. If the string is not in the list, then Microsoft
> >> >> >> Access
> >> >> >> displays an error message.
> >> >> >> -- 
> >> >> >> Arvin Meyer, MCP, MVP
> >> >> >> http://www.datastrat.com
> >> >> >> http://www.accessmvp.com
> >> >> >> http://www.mvps.org/access
> >> >> >>
> >> >> >>
> >> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> >> >> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
> >> >> >> > Hi Arvin, thanks for coming back to me, it is much appreciated.
> >> >> >> >
> >> >> >> > I don't think that I need the generic NotinList code, I have 
> >> >> >> > that. I
> >> >> >> > think
> >> >> >> > I
> >> >> >> > need to understand if the NotinList code will add a new record to
> >> >> >> > the
> >> >> >> > Table
> >> >> >> > or of it will modify the Drop Down List only. Forgive me pleas, I
> >> >> >> > get
> >> >> >> > confused when dealing with Tables and Forms.
> >> >> >> > Thanks RayC
> >> >> >> >
> >> >> >> >
> >> >> >> > "Arvin Meyer [MVP]" wrote:
> >> >> >> >
> >> >> >> >> If you're looking for generic NotInList code:
> >> >> >> >>
> >> >> >> >> http://www.datastrat.com/Code/NotInListCode.txt
> >> >> >> >>
> >> >> >> >> or a demo of that code is at:
> >> >> >> >>
> >> >> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
> >> >> >> >> -- 
> >> >> >> >> Arvin Meyer, MCP, MVP
> >> >> >> >> http://www.datastrat.com
> >> >> >> >> http://www.accessmvp.com
> >> >> >> >> http://www.mvps.org/access
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
> >> >> >> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
> >> >> >> >> > Can anyone help point out what i am doing wrong Please?
> >> >> >> >> > I want to generata a new record and I get to that point by 
> >> >> >> >> > having
> >> >> >> >> > the
> >> >> >> >> > user
> >> >> >> >> > enter a search for a record in a Table via a combo. When the
> >> >> >> >> > record
> >> >> >> >> > is
> >> >> >> >> > Found
> >> >> >> >> > in the Table, no problem The user can view the Record, Edit 
> >> >> >> >> > it,
> >> >> >> >> > etc.
0
Utf
4/12/2010 10:10:01 AM
It shouldn't be necessary, but if it works for you, go with it.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"Ray C" <RayC@discussions.microsoft.com> wrote in message 
news:327C0606-C628-427B-9A72-D67126282FD9@microsoft.com...
> Hi Arvin
> In your demo code, you have the sub
>
> Private Sub cmb_Find_Box_3_AfterUpdate()
>
>    Me.cmb_Find_Box_3.Requery
>
> End Sub
> in your "frmEvents" (I changed the name of the Combo Box to fit my code)
> When I integrated your code into mine. I found that the Record was 
> generated
> in the table OK but I could not find the record afterwards using my normal
> enquiry.
> What I needed to do was to shut down and re open the whole database and 
> only
> then could I find the new record with my enquiry.
>
> What I have done is tto add the following line
>
> Private Sub cmb_Find_Box_3_AfterUpdate()
>
>    Me.cmb_Find_Box_3.Requery
>    ME.Requery
> End Sub
> and this seems to have sorted the problem out. Does this sound right to 
> you?
>
> Thanks and regards RayC
>
>
> "Arvin Meyer [MVP]" wrote:
>
>> In the module there is the line:
>>
>> Response = acDataErrAdded
>>
>> That adds the entry into your combo box. You DO NOT need to requery the
>> combo. I suggest that you use the demo code and forms at:
>>
>> http://accessmvp.com/Arvin/NotInListDemo.zip
>>
>> To see how it works, then copy the exact code into each of your forms and
>> change the names of the form and fields to match yours. NewData and 
>> Response
>> do not get changed. They are intrinsic to the code.
>> -- 
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.accessmvp.com
>> http://www.mvps.org/access
>>
>> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> news:01582ABB-25BD-47E0-854E-5E378D79CDD9@microsoft.com...
>> > Hi Arvin, Sorry for my Typo leading you astray, the code is "New Data" 
>> > and
>> > not "strNewData". in either event, the new data that is not currently a
>> > record is passed to the form that you open in your code and does get
>> > appended
>> > to the table as a new record. My issie is with the Requery command and
>> > where
>> > that goes. as I tried nto explain in the body of my last message. I 
>> > seem
>> > to
>> > get errors wherever I put the "Requery" comand and without running
>> > "Requery"
>> > somewhere after closing the form that is used to enter the new record
>> > information, the new information (that is in the table) is not shown in
>> > the
>> > combo box.
>> >
>> > Hope that this makes sense.
>> >
>> > Ray C
>> >
>> > "Arvin Meyer [MVP]" wrote:
>> >
>> >> strNewData should be NewData
>> >> -- 
>> >> Arvin Meyer, MCP, MVP
>> >> http://www.datastrat.com
>> >> http://www.accessmvp.com
>> >> http://www.mvps.org/access
>> >>
>> >>
>> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> news:42DDFD16-7D93-4309-ACBE-BE8D7B458237@microsoft.com...
>> >> > Hi  Arvin, still struggling I am afraid. Although I now have the new
>> >> > record
>> >> > being added to the table correctly (using your code), I get errors 
>> >> > when
>> >> > i
>> >> > try
>> >> > to run the requery
>> >> >
>> >> > Private Sub cmb_Find_Box_3_NotInList(NewData As String, Response As
>> >> > Integer)
>> >> >
>> >> >    AddToList "frm_Store_Add", "StoreName", strNewData, Response   '
>> >> > Arvin
>> >> > Mayer code
>> >> >       ' Me.cmb_Find_Box_3.Requery
>> >> > End Sub
>> >> >
>> >> > I have the requery in the cmb_Find_Box_3_after update event but that
>> >> > routine
>> >> > does not get called (though it does in your test code???)
>> >> > If I enter some dats that is not in the table (more correctly the 
>> >> > list
>> >> > that
>> >> > is based on the table), the NotInList routine kicks in and the 
>> >> > program
>> >> > happilt toddles off to generate the new record (using your code). 
>> >> > When
>> >> > it
>> >> > returns from that task, you will see that i have
>> >> > "Me.cmb_Find_Box_3.Requery.
>> >> > However when the program gets to that line I get an error that says
>> >> > "Run-Time
>> >> > Error 2118" "You must save thr currentit feld before you run the
>> >> > requery
>> >> > action"
>> >> > If I take out that line, I get an error that says  "The Text you
>> >> > entered
>> >> > is
>> >> > not an item in the list"
>> >> > Either way, the table shows that my New Record is added but the 
>> >> > record
>> >> > does
>> >> > not show as a new item in the Combo drop Down list.
>> >> > Clearly it is a problem with the requery commant but why does your 
>> >> > test
>> >> > code
>> >> > work ok bur mine gives problems? I guess the answer to that is just
>> >> > that
>> >> > you
>> >> > are the expert and i am the novice.
>> >> > Thanks Arvin
>> >> >
>> >> > Ray C
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > "Arvin Meyer [MVP]" wrote:
>> >> >
>> >> >> Ray,
>> >> >>
>> >> >> The example at:
>> >> >>
>> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
>> >> >>
>> >> >> is eaxctly what you want. Try importing everything into your 
>> >> >> database
>> >> >> and
>> >> >> changing all the names to fit with your names.
>> >> >>
>> >> >> You won't be able to do both fields with a single combo box, so 
>> >> >> you'll
>> >> >> need
>> >> >> 2 of them. I recommend getting 1 to work, then copying everything 
>> >> >> with
>> >> >> the
>> >> >> new names. The generic code function I listed is perfect for you,
>> >> >> because
>> >> >> you can make the same NotInList function work with both combo 
>> >> >> boxes.
>> >> >> -- 
>> >> >> Arvin Meyer, MCP, MVP
>> >> >> http://www.datastrat.com
>> >> >> http://www.accessmvp.com
>> >> >> http://www.mvps.org/access
>> >> >>
>> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> >> news:403EA48A-E06C-47ED-8FA4-1E1D7DCD18FD@microsoft.com...
>> >> >> > Hi Arvin, I am not sure if I explained my problem badly or if I 
>> >> >> > am
>> >> >> > just
>> >> >> > too
>> >> >> > dumb to understand your solution but I have tried the code that 
>> >> >> > you
>> >> >> > provided
>> >> >> > and I can not get it to generate a new Record in my Table.
>> >> >> > Please let me try to explain my problem again and i would be 
>> >> >> > pleased
>> >> >> > if
>> >> >> > you
>> >> >> > could give me any pointers as to where i am going wrong in my
>> >> >> > understanding
>> >> >> > of your answer.
>> >> >> >
>> >> >> > I have a pretty standard table holding property information 
>> >> >> > (Address
>> >> >> > etc)
>> >> >> > but eac property has a NameAddress info. The Table holdsname and
>> >> >> > addresswith
>> >> >> > the Name (normaly the Town where it is) and also a Property 
>> >> >> > Number
>> >> >> > (provided
>> >> >> > by the Owner). The table has an "Auto Number Index" and holds 
>> >> >> > other
>> >> >> > information about the property. Because the user may wish to 
>> >> >> > search
>> >> >> > the
>> >> >> > Table
>> >> >> > by either the property name or the property number, I have two 
>> >> >> > combo
>> >> >> > boxes
>> >> >> > that providr drop down's for the user to select as needed. Once 
>> >> >> > the
>> >> >> > user
>> >> >> > has
>> >> >> > selected the  required property "Name" or the required property
>> >> >> > "Number" i
>> >> >> > have a ruotine that searches through the Address Table, finds the
>> >> >> > record
>> >> >> > and
>> >> >> > displays all the fields in that record. All of that is fine.
>> >> >> > What I am wanting to do is for the user to be given the ability 
>> >> >> > to
>> >> >> > Add
>> >> >> > a
>> >> >> > New
>> >> >> > Record to the Table if the information they entered in the Combo 
>> >> >> > Box
>> >> >> > is
>> >> >> > not
>> >> >> > found in the Address Table.
>> >> >> >
>> >> >> > My Current attempt at a sollution to this is to use the notIn 
>> >> >> > List
>> >> >> > event
>> >> >> > to
>> >> >> > branch off to a routine that should generate a new *Blank" record
>> >> >> > that
>> >> >> > will
>> >> >> > be appended to the end of the adress Table, and show the user a 
>> >> >> > form
>> >> >> > full
>> >> >> > of
>> >> >> > Blank Fields (with the exception of the information they 
>> >> >> > originally
>> >> >> > searched
>> >> >> > for). The usr should then fill in the blank fields before saving 
>> >> >> > (or
>> >> >> > rejecting) the "New Record" appended to the end of the Table.
>> >> >> >
>> >> >> > As I tried to explain originally I experimented with the "DoCmd
>> >> >> > GoToRecord
>> >> >> > acForm, meName, acNewRec", this does generate a new Record in the
>> >> >> > Table
>> >> >> > and
>> >> >> > present the user with a series of blank Fields to complete but 
>> >> >> > any
>> >> >> > information that is enterd into the blank fields is inserted into
>> >> >> > the
>> >> >> > previous record.
>> >> >> >
>> >> >> > I hope that this helps.
>> >> >> > Thanks for your patience
>> >> >> > RayC
>> >> >> >
>> >> >> > "Arvin Meyer [MVP]" wrote:
>> >> >> >
>> >> >> >> That depends upon the constant you use:
>> >> >> >>
>> >> >> >> acDataErrDisplay    -    (Default) Displays the default message 
>> >> >> >> to
>> >> >> >> the
>> >> >> >> user.
>> >> >> >> You can use this when you don't want to allow the user to add a 
>> >> >> >> new
>> >> >> >> value
>> >> >> >> to
>> >> >> >> the combo box list.
>> >> >> >>
>> >> >> >> acDataErrContinue    -    Doesn't display the default message to
>> >> >> >> the
>> >> >> >> user.
>> >> >> >> You can use this when you want to display a custom message to 
>> >> >> >> the
>> >> >> >> user.
>> >> >> >> For
>> >> >> >> example, the event procedure could display a custom dialog box
>> >> >> >> asking
>> >> >> >> if
>> >> >> >> the
>> >> >> >> user wanted to save the new entry. If the response is Yes, the
>> >> >> >> event
>> >> >> >> procedure would add the new entry to the list and set the 
>> >> >> >> Response
>> >> >> >> argument
>> >> >> >> to acDataErrAdded. If the response is No, the event procedure 
>> >> >> >> would
>> >> >> >> set
>> >> >> >> the
>> >> >> >> Response argument to acDataErrContinue.
>> >> >> >>
>> >> >> >> acDataErrAdded     -    Doesn't display a message to the user 
>> >> >> >> but
>> >> >> >> enables
>> >> >> >> you to add the entry to the combo box list in the NotInList 
>> >> >> >> event
>> >> >> >> procedure.
>> >> >> >> After the entry is added, Microsoft Access updates the list by
>> >> >> >> requerying
>> >> >> >> the combo box. Microsoft Access then rechecks the string against
>> >> >> >> the
>> >> >> >> combo
>> >> >> >> box list, and saves the value in the NewData argument in the 
>> >> >> >> field
>> >> >> >> the
>> >> >> >> combo
>> >> >> >> box is bound to. If the string is not in the list, then 
>> >> >> >> Microsoft
>> >> >> >> Access
>> >> >> >> displays an error message.
>> >> >> >> -- 
>> >> >> >> Arvin Meyer, MCP, MVP
>> >> >> >> http://www.datastrat.com
>> >> >> >> http://www.accessmvp.com
>> >> >> >> http://www.mvps.org/access
>> >> >> >>
>> >> >> >>
>> >> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> >> >> news:661E24FB-F745-4C05-903C-C2C8F4E7321D@microsoft.com...
>> >> >> >> > Hi Arvin, thanks for coming back to me, it is much 
>> >> >> >> > appreciated.
>> >> >> >> >
>> >> >> >> > I don't think that I need the generic NotinList code, I have
>> >> >> >> > that. I
>> >> >> >> > think
>> >> >> >> > I
>> >> >> >> > need to understand if the NotinList code will add a new record 
>> >> >> >> > to
>> >> >> >> > the
>> >> >> >> > Table
>> >> >> >> > or of it will modify the Drop Down List only. Forgive me 
>> >> >> >> > pleas, I
>> >> >> >> > get
>> >> >> >> > confused when dealing with Tables and Forms.
>> >> >> >> > Thanks RayC
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Arvin Meyer [MVP]" wrote:
>> >> >> >> >
>> >> >> >> >> If you're looking for generic NotInList code:
>> >> >> >> >>
>> >> >> >> >> http://www.datastrat.com/Code/NotInListCode.txt
>> >> >> >> >>
>> >> >> >> >> or a demo of that code is at:
>> >> >> >> >>
>> >> >> >> >> http://accessmvp.com/Arvin/NotInListDemo.zip
>> >> >> >> >> -- 
>> >> >> >> >> Arvin Meyer, MCP, MVP
>> >> >> >> >> http://www.datastrat.com
>> >> >> >> >> http://www.accessmvp.com
>> >> >> >> >> http://www.mvps.org/access
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> "Ray C" <RayC@discussions.microsoft.com> wrote in message
>> >> >> >> >> news:06E5BE90-ECD9-4D31-BB4F-81B9F87EF23A@microsoft.com...
>> >> >> >> >> > Can anyone help point out what i am doing wrong Please?
>> >> >> >> >> > I want to generata a new record and I get to that point by
>> >> >> >> >> > having
>> >> >> >> >> > the
>> >> >> >> >> > user
>> >> >> >> >> > enter a search for a record in a Table via a combo. When 
>> >> >> >> >> > the
>> >> >> >> >> > record
>> >> >> >> >> > is
>> >> >> >> >> > Found
>> >> >> >> >> > in the Table, no problem The user can view the Record, Edit
>> >> >> >> >> > it,
>> >> >> >> >> > etc. 


0
Arvin
4/25/2010 4:03:33 PM
Reply:

Similar Artilces:

Reports - Customization - Add new Columns
I have a few questions regarding customizing the active reports. For example, in detailed sales report, we want to add columns like Average Selling Price (ASP), Average Units Sold/Transaction etc. How do we go about it? What needs to be done? Any documentation available? Regards. ...

Duplicate the current record into an array
Could anyone help with modifying the code example below? My current database uses the autonumber field as the Primary key so I did not have a problem adapting it for my use. However the dB I am now creating needs the code to be modified as table 1 does not have its Primary key assigned to its autonumber field. For Table 1 the autonumber field is called ID_Main and the Primary key has been assigned to a field called� acd�. For Table 2 the Primary key has been assigned to the autonumber field i.e. ID_SI For Table 3 the Primary key has been assigned to the autonumber field i.e. ID_A...

setting form record source when form is opened
I have a question about setting the record source of a form at the time the form is opened. Background: I need to clean up and modify an application. The application currently only has one table and one template form for data entry. However a separate copy of a selection query and a separate copy of the data entry form have been created for each analyst in the office. The only difference between the queries is the CurrentAnalyst criteria is set to one person’s name. The only difference between the forms is the record source is set to a different selection query. Currently the analysts o...

From switchboard
On my switchboard I have three choices. Enter in Data, Edit current record, Run report. The Edit Currrent Record pulls up a previously entered record via query parameter. My question is do I need to make a copy of my Data Entry (new record) form for this Edit? The macro or command or whatever asks which form to pull up when setting switchboard. Does it pose a problem if either choice pulls up the same form? You can use the same form. Typically, there're different considerations depending on whether your making a new entry (record) into your database or editing an existing entry, so you m...

Adding a new line to an existing graph, using excel 2007
Hi: I would like instructions on how to add a new line to an existing graph (that already has 5 lines), using Excel 2007. The data is already in my spreadsheet. -- jim white EXCEL 2007 1. Right click in the graph. 2. Of the options that become displayed select:- Select Data . . . 3. Select Data Source window should launch. 4. Highlight the extended range of data you want to include in your graph (including the new data). 5. Hit OK. 6. The 6th line should get added to your graph. If my comments have helped please hit Yes. Thanks. "...

New Balloon
New to this I have followed the instruction to set up an help balloon, copied and pasted the example into my module box but it does not work. I do not really know where to start. I go into VBA and then Help am I supposed to do something else Thanks john -- JohnM So, what have you got in your module box? "JohnM" wrote: > New to this > > I have followed the instruction to set up an help balloon, copied and pasted > the example into my module box but it does not work. > I do not really know where to start. I go into VBA and then Help am I > supposed to do...

Outlook 2007 (Writing new mails problem)
Hey I have just installed Office 2007 (and thereby Outlook 2007). It works perfectly except when writing emails the CPU load is beteween 30% and 100% even when i am not typing. (My system is 2.4Ghz / 1 Gb ram) This is somewhat a showstopper so id any one has experienced/solved this problem i would appriciate some help to continue to help with the Beta program. Regards Anders ...

Merge records problem
Hi! I am currently buiding an ASP.NET web page to delete and merge some records (accounts). "delete" works ok but "merge" always give me an error "Server was unable to process request". Is there any one have a clue why? Thanks in advance! My code looks like this: // Create the target for the request. TargetMergeAccount target = new TargetMergeAccount(); // EntityId is the GUID of the account that is being merged into. target.EntityId = new Guid("10293BA6-8B15-DB11-90F3-00065BA9C089"); // Create the request. MergeRequest merge = new MergeRequest(); /...

Applying changes to record
Is there any way in Access 2003 to apply any edits to a record or entry of a new record only when a user clicks on a button? Like when you edit a document, changes aren't applied to the document file unless you click save or save as. i usually get around this by turning off the Close X button in the form properties, and the making my own button for Cancel/Close that uses the Undo Record change command. that way they are forced to either click save, or click cancel and are not able to simply close the form by clicking the X. You could use the form's Current event to set ...

Not all pages in record print
When I go to print a Contact record, with lengthy notes, it only prints the first 3 pages - anyone know how to make it print ALL? TIA! -- TWhelan ...

Delete Records Where The Like* Can Be used??
Hi I am trying to use a delete query where any records that contain the Word Proprietor is removed. In My current table there are hundreds of records within a "Customer Name" field where the names are for example: Mr T Proprietor Mr D Proprietor Mr C Proprietor I Would like to delete all of the records that contain the word "Proprietor" as these are records that are not used. I have tried a Like "Proprietor*" Query But this didn't work. If anyone could help it would be great Cheers Juzer Bateman28 <Bateman28@discussions.micros...

SQL OPtions when setting up new user
In version 7.5, there was options for updating the SQL server with user information, (checkboxes) I cant find that in version 9. What is happening is we add users to PDK, and have that program update the SQL database with the user information. Now when I try and add a user to Great Plains, I get the message that the user is already a user in the database. Where can you turn the option off to update the SQL database and just add the user to Dynamics? thanks! -- Doug Same question. Please advise! "Doug" wrote: > In version 7.5, there was options for updating the SQL...

From new Publisher to old
Hi. I have constructed a document in Publisher XP, and I am now sitting at a computer with Publisher 2000. And I need the document now. Is there anyway that I online can convert the document. I realise I should have converted at the computer with the newer Publisher, and I though I did - but I must have forgotten. Is there any way I can get around my stupid mistake, or will I HAVE to pay? ...

Help with moving a multi-row record
Hi, I have a singel excel column that has names addresses and phone numbers. I need to move the records to a single row each. name address phone needs to be name, address, phone numbers. can this be done in a macro? can you help.. Ihave 4000 records to move to a csv file from the original format. Thanks... Andrew There are a couple of ways of doing this. 1) You could write a macro. 2) If you want to do this without a macro,then a) Assume that the data is in column A b) Assume that there is a blank line between each block In C1 - E1 put in the headings (Name, Address, Phone) In C...

New mailboxes not getting added to store
We have a running Exc 2003 server that has been working fine for several months now, but recently when adding users in AD and making sure the 'create mailbox' box is ticked on user add screen, the mailbox is not added to the store. The user is set up in AD and can be seen across all servers, and the Exc settings are seen, but no mailbox, email address etc. HELP?!?! "AG" <andrew.griffiths@xko.co.uk> wrote: >We have a running Exc 2003 server that has been working >fine for several months now, but recently when adding >users in AD and making sure the &#...

New Date on each new page
I would like to print a page for each day for the upcoming year. 365 pages. I want to print all of them now. On each page I need the date for that day. What should I use for this? Pivot tables?? Thanks! Jim Hi Jim Enter the first day in A1 before you run the macro If it is working correct change PrintPreview to PrintOut This example will not print the sunday's Untested Sub PrintCopies_ActiveSheet() Dim yr As Integer yr = Year(Range("a1").Value) Do While Year(Range("a1").Value) = yr If Application.WorksheetFunction. _ Weekday(Ran...

Deleting records in a subform of a subform
Using Access 2007 with Vista Premium, I have a customer master form. I have a subform in this form which views one-to-many contracts for that customer. Within the subform is another subform to view multiple tickets for the particular contract. When I highlight a record in the second subform and hit the delete key the record appears to delete. However, no delete warning message appears and the record is only marked for deletion in the query, but is not physically deleted. Going to design view and back to form view confirms that the record in the second subform was not deleted. High...

multiple posts due to using new outlook version
Sorry about that! Gordon F. Howell ghowell(NOSPAM)@princemusictheater.org or GFHowell(NOSPAM)@aol.com ...

CRM 4 - Workflow - Update Record
Hi, In 4.0 I am doing a workflow that changes a bit field to Yes. (checking on a checkbox.) The problem is that not touching the other checkboxes on the form causes the workflow engine sets them to No, rather than leaving them unchanged, which is what I want. Anyone know how to deal with this? Thanks! Export the Form then Re-import and then recreate the workflow - I had this and I solved by the above procedure. I temporarily chnaged chnaged a couple of the tickboxes to radio buttons so I could see whta the workflow form was going to do. Pete "Dynamics" <Dynamics@dis...

Duplication of Records
I just inherited a database, an .mdb file. We are using Access 2007 but it had not been converted. I now notice that when a record is created in one of the forms, the record is duplicated, so it shows up twice in the form (the form was created in datasheet format in Access 2003). I will convert the database, but do want to attempt to troubleshoot first. Can anyone give me suggestions as to what I should look at. Thank you Paul Start by opening properties of the form and see what the recordsource is, ie, table or query. Then open the table or query and see if it contains ...

How can I install Excel 95 on a new Windows Vista machine ?
For historical and educational reasons, I want to install Excel 95 on a brand new HP PC, which comes shipped wth Vista. Can I install Windows XP somewhere on it (which does support Excel 95 (ie Version 7) ) ? The outcome of this ambition matters very greatly to me.. Couple of ways to go. 1. Install Virtual PC.....downloadable from Microsoft site........and put WinXP and Excel 95 on that. 2. Partition your HDD and install WinXP on that partition giving you a dual-boot. Maybe ask over in the microsoft.public.virtualpc or microsoft.public.windowsxp.general news groups. Gord Dibben MS...

Generate ASP.Net page from an XML
Hello, I have an xml file and xsd file, I am trying to develop an application that reads the xml and xsd and generate an asp.net page (with elements names as labels and either text box, combo box, e.tc for element values). I searched the web but did not find any article to how do accomplish this. If you are aware of an article or information, can you please post here. Kind Regards ...

Resetting textbox values to blank after new record is added i.e. h
Hello Can anyone tell me how to code my command button to reset textbox values to blank after it has completed updates to tables? Many thanks in advance and kind regards, Nick ...

XSD Code Generation problem
Hi, I have two XSDs both in seperate namespaces, Child is an extension of the abstract Base: <?xml version="1.0" encoding="utf-8"?> <xs:schema id="Base" targetNamespace="http://tempuri.org/Base.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/Base.xsd" xmlns:mstns="http://tempuri.org/Base.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="complexType1" abstract="true"> <xs:sequence> <xs:element name="Name" type=...

New Server and OST file
Hi, I know we did this all wrong so please no 'you should have done this' comments :) We took out the old server (SBS 2003), installed a new server (SBS 2003), made the domain name the same and expected it to pick up the clients where it left off. Unfortunately what it did was create new profiles on each client PC. Others were able to get all their exchange items back (think they had PST copies of their items) however mine only had a local OST file. It is about 700Mb worth and I really need the information back. Is there a way to import this info somehow, as I have not yet been ab...