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 / October 2005

Tip: Looking for answers? Try searching our database.

Q: on a simple form design

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Inma - 19 Oct 2005 12:30 GMT
Hello,

Perhaps I'm not seeing the trees in a forest but I'm totally stumped.

I've two simple tables, CUSTOMERS and EXPENSES. The latter has CUSTOMER_ID
as a link to the first table (CUSTOMERS.CUSTOMER_ID <->
EXPENSES.CUSTOMER_ID).

I need to create a form to input data in the EXPENSES table selecting the
customer name from CUSTOMERS.

How would I go by?

TIA

Inma
Rick Brandt - 19 Oct 2005 12:48 GMT
> Hello,
>
[quoted text clipped - 8 lines]
>
> How would I go by?

Multiple methods are available, but here is what I would do...

Create a form bound to the Customers table displaying everything you want to see
about the customer.  Then add an unbound ComboBox labelled "Go To...".  The
RowSource of that ComboBox should include CUSTOMER_ID and CUSTOMER_NAME with
CUSTOMER_ID being the bound column (hidden if you like).  In the AfterUpdate
event of the ComboBox have code...

Me.Filter = "CUSTOMER_ID = " & Me!GoToComboBoxName
Me.FilterOn = True

You now have a simple Customer form with an easy ability to view any one
customer by using the ComboBox.

Now create a continuous view form bound to the Expenses table and format how you
want it to look.  When finished you can open the Customer form in design view
and drag the expenses form from the db window onto the customer form and Access
will automatically add the expenses form as a subform.

It is important that the linking field CUSTOMER_ID be entered into the
MasterLink and ChildLink properties of the subform.  If you have these
relationships defined in the relationships window then Access should insert the
property values automatically (check them anyway).

Now when you move from customer to customer with the ComboBox you will see each
customers expenses in the subform and can make edits and insertions.

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

Inma - 19 Oct 2005 13:35 GMT
Thank you much Rick.

I followed your steps but when I run the main form, a popup windows askes
for the CUSTOMER_ID. I don't understand it! I did link the field as
Master/Child. What am I missing?
Inma

>> Hello,
>>
[quoted text clipped - 36 lines]
> Now when you move from customer to customer with the ComboBox you will see
> each customers expenses in the subform and can make edits and insertions.
Rick Brandt - 19 Oct 2005 13:48 GMT
> Thank you much Rick.
>
> I followed your steps but when I run the main form, a popup windows
> askes for the CUSTOMER_ID. I don't understand it! I did link the
> field as Master/Child. What am I missing?
> Inma

Are you absolutely positive that both form's RecordSets have a field with
that exact name?

If you reset those properties using the builder (the [...] button to the
right of either one), then you are given the option of choosing fields from
the RecordSets of each form and therefore it should be impossible to pick an
invalid one or get the spelling wrong.  I would try that.

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

Inma - 19 Oct 2005 13:55 GMT
Yes. However, when I draged the expenses form into the customer one, Access
did't set up the Master/Child field. So I did it manually. I also have a
query for both tables and works fine.

>> Thank you much Rick.
>>
[quoted text clipped - 12 lines]
> an
> invalid one or get the spelling wrong.  I would try that.
 
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.