form events for not in list

  • Thread starter Thread starter lefty
  • Start date Start date
L

lefty

I have a form with combo boxes which look up records in tables. the
not in list event opens a new form which allows user to enter a new
record into the table that the combo box control looks up data. i'd
like the uncommitted content of the combo box of the original form to
populate the text box in the newly opened form. once the 2nd form is
completed and closed, i'd like the new data to be available in the
combo box of the original form. opening the new form with a macro
seems easy enought with the not in list event, but i'm having a hard
time finding the right combination and sequence of events to get the
job done without errors. i have no idea how to get the text from the
combo box to the new form text box also.

not sure if this is enough info but any help is appreciated.

thanks
lefty
 
Hi lefty,

In the On Open event of your popup form, have something like this:

me.TEXTBOX = forms!FORMNAME.COMBOBOXNAME

Hope this helps.

Damian.
 
Hi lefty,

In the On Open event of your popup form, have something like this:

me.TEXTBOX = forms!FORMNAME.COMBOBOXNAME

Hope this helps.

Damian.







- Show quoted text -

Thank you,
now i'm pretty new at this so forgive me....
do i use as an expression or as vb code. and i understand that i
replace the form name and comboboxname with my items but what about
the TEXTBOX. do i replace that with my textbox name?
 
Hi,

Yes, you do it in code, in the On Open event of your popup form. Yes,
TEXTBOX is the name of your textbox control that you wish to populate.

Damian.
 
Hi lefty,

In the On Open event of your popup form, have something like this:

me.TEXTBOX = forms!FORMNAME.COMBOBOXNAME

Hope this helps.

Damian.







- Show quoted text -

Thanks Damian

i know almost nothing about visual basic or code currently. my
experience with access has just been with the built in macros and some
basic functions. do you or anyone have any suggested reading for a guy
like me to learn visual basic? and are there any web sites that might
have code available for copying or dowloading?
thanks
lefty
 
Hi lefty,

There's a thousand of them out there... google Access tutorial or Access
Sample Database and you will find more than you could ever want.

Damian.
 
Hi lefty,

There's a thousand of them out there... google Access tutorial or Access
Sample Database and you will find more than you could ever want.

Damian.







- Show quoted text -

thank you,

a couple of new questions if i could.

i have a form companies and a subform in that form contactsincompany.
when companies opens, i have a macro saying gotocontrol subform which
brings me to the first control in the tab order of subform...which is
good. the next command in the macro is gotorecord new because i want
the subform to be in add mode. i get an error though saying the
subform is not open. is a subform not open even when the main form is
open? any suggestions? thanks. i utilize contactsincompany subform in
other forms also.

Also, i have date formated fields that for some reason record date as
3 /7 /2007 rather than 3/7/2007. is this normal?
Thanks
 
Back
Top