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 / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

autofill

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jkjmwilliams - 23 Mar 2007 13:53 GMT
I have a form that I would like to autofill on field if another field meets a
certain criteria. For example: I have several services I perform. That field
is services. Depending on what that service is, the price field changes. Is
there anyway to get the price field to auto fill depending on what I put in
the service field?
JoAnn
Graham R Seach - 23 Mar 2007 14:29 GMT
JoAnn,

I'd suggest creating a new table to store your services and the rates you
charge for them:
   tblService
       Service (Text, Primary Key)
       Rate (Currency)

Then, add a combo box, called cboService, to your form, and set its
RowSource as follows:
   SELECT * FROM tblService ORDER BY Service

Bind the combo box to the rate field in the form's underlying table. Set the
combo box's other properties as follows:
   ColumnCount: 2
   ColumnWidths: 2cm;2cm

Then in the combo box's AfterUpdate event, add the following code to
populate the txtRate textbox:
   If Me!txtRate = Me!cboService.Column(1)

Then add the same code to the form's Current event.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

>I have a form that I would like to autofill on field if another field meets
>a
[quoted text clipped - 6 lines]
> the service field?
> JoAnn
jkjmwilliams - 23 Mar 2007 16:09 GMT
Thanks! I've been trying to figure out how to do that for a long time and
asked everyone I knew. I tried it, and it worked.

> JoAnn,
>
[quoted text clipped - 34 lines]
> > the service field?
> > JoAnn
 
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.