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

MS Access Forum / Forms Programming / February 2006

Tip: Looking for answers? Try searching our database.

Using combobox to repeat data to next record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alex Martinez - 27 Feb 2006 22:41 GMT
Hello,

I have a form with a search box,  when I type in a policy number the policy
number will appear in the txt box  next to my search box.  For every new
record I will assign a user thru the combobox, but I want to do some sort of
batch process.   For example -  I like to continue to  search for the policy
and  assign a user to the  policy number, but continue to search for more
policy using the same previous assigned user. I was think maybe I can have a
some sort of command but that will retain the assigned user until I press it
again.  The problem is I may have about hundred policies to assigned and
keep assigning the user thru the combobox can be a pain.  Any tips or websit
to vist, please let me know.  Thank you in advance.
John Nurick - 28 Feb 2006 06:38 GMT
Hi Alex,

I'm not sure which of two things you want. Is it

(a) You select a user from a combo box on one record. The same user
subsequently appears as the default choice when you create a new record.

or

(b) You select a user on one record. You want an easy way to set the
same user after you've scrolled to another (new or existing) record.

If (a): put a line of code in the combobox's AfterUpdate event that sets
its DefaultValue, e.g.:
    Me.ActiveControl.DefaultValue = Me.ActiveControl.Value

If (b): put code in the combobox's AfterUpdate event that stores its
current value, and have a commandbutton on the form that retrieves the
stored value to the combo's Value property.

You can store the value in a variable declared at module level in the
form's code module, or in a text box with its Visible property set to
false: but in that case the stored value is lost when you close the
form. To have the stored value persist between uses of the application,
you need to store it in a table (many databases use little tables to
store these and other user-related settings).

>Hello,
>
[quoted text clipped - 8 lines]
>keep assigning the user thru the combobox can be a pain.  Any tips or websit
>to vist, please let me know.  Thank you in advance.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



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