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 / November 2007

Tip: Looking for answers? Try searching our database.

Problem with Subform control not working properly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Horselover - 01 Nov 2007 20:05 GMT
I have a subform that will not be used with every record; it is a follow up
form. If a customer has an issue that needs followed up on, then the end user
will click the button, the subform will open, and they will enter the
appropriate information.

I'm having several problems with this subform.  First, I want it linked by
the Customer Number (primary keys for both forms) to my main form, so when
you open the Follow Up form, it already has the Customer Number in that
field.  I cannot seem to get it to do that - it will allow me to enter that
number in there, but it will also allow me to put the incorrect Customer
Number in there, which assigns the follow up item I enter to the incorrect
person - just tried it. Not good!

Second when I open the form and a Customer has not had a follow up yet, I
want it to be a blank form.  How do I get it to do that?  It also says it's
filtering the form, if that helps......

Thank you for any help you can give me....  :)
KARL DEWEY - 01 Nov 2007 23:52 GMT
>>First, I want it linked by the Customer Number (primary keys for both
forms) to my main form, so when you open the Follow Up form, it already has
the Customer Number in that field.
Forms do not have primary keys.  Tables have primary keys.  You need to use
a query for the subform source that include the primary key of the table that
is the one side of a one-to-many relationship.
   Like this --
Employee table EmpID as primary (unique) --
EmpID  LName  FName etc
A001    Jones   Bill       ...
C004    Brown  Joe      ...

Time_Card table with EmpID as foreign key --
EmpID  WrkDate  Hrs    Type
A001    1/1/2007  8      Reg
A001    1/2/2007  4      Vac
A001    1/2/2007  4      Reg
A001    1/3/2007  8      Reg
C004    1/1/2007  8      Reg
C004    1/2/2007  8      Reg
C004    1/2/2007  1      OT
C004    1/3/2007  8      Reg

The form/subform are link Master/Child on the EmpID fields.

Signature

KARL DEWEY
Build a little - Test a little

> I have a subform that will not be used with every record; it is a follow up
> form. If a customer has an issue that needs followed up on, then the end user
[quoted text clipped - 14 lines]
>
> Thank you for any help you can give me....  :)
Horselover - 02 Nov 2007 12:33 GMT
Thanks, appreciate your help!

> >>First, I want it linked by the Customer Number (primary keys for both
> forms) to my main form, so when you open the Follow Up form, it already has
[quoted text clipped - 39 lines]
> >
> > Thank you for any help you can give me....  :)
 
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.