Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Oct 2013
    Posts
    163

    Unanswered: <span itemprop="itemListElement">Linking of Form & SubForm - Timesheet Database</span

    Dear Seniors,

    I would like to seek your help for my Project use. I had created the database for monitoring the Time sheet. I have created 2 tables with same primary key say employee ID and I had created the forms for updating the tables. I had created a multiple form main form for updating the table 1. When I click the employee ID then the sub form should open for updating the second table. I had done the linking using the macros and it works fine.

    Now the problem is when I add the data in sub form, I am getting the error primary key field can't be null. Could you please help me to sort out this issue. My objective is to update the 2nd table using the sub form. I had used the formula to get the Primary key value in the sub form, but still I am not able to add the data.

    Hope I had explained my problem clearly, if not please let me know for any further information's.
    Thanks and Regards
    R. Vadivelan

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I'm not sure what you mean by linking use macros. I would expect the master/child link properties of the subform control to be the employee ID field. That will automatically populate that field on new records.
    Paul

  3. #3
    Join Date
    Oct 2013
    Posts
    163
    Dear PBaldy,

    I had created two forms and from the two tables. Now when I click the employee ID in form 1, then it should open the time sheet of the particular employee in a another window (by filtering the Employee ID). Now the problem is both the tables are having the same primary key, so when I add the data in the second form it always asking me to enter the Employee ID (Primary key value). I had gone through the post related to child transmittal and i understood child transmittal can be opened in same window (Please correct me If I am wrong) where us I want to open this form in a new window.
    Thanks and Regards
    R. Vadivelan

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Can you post the db here?
    Paul

  5. #5
    Join Date
    Oct 2013
    Posts
    163
    Dear Paul,

    I had received the attached file from my seniors, but I could not edit the forms or modules for my project use since I understood that it is in .mde format. So I am looking to create the similar type of form in my database. Due to database size is big, I had zipped and attached same.PAFSystem_R5.2.zipClick image for larger version. 

Name:	Image.jpg 
Views:	8 
Size:	266.6 KB 
ID:	16013

    I had also attached herewith my database which I had created with help of this forum. My objective is to add the weekly man hours for all the people from Frm_PAF. Since It is working file I have not given the namings in a correct manner and I am sorry for that.

    Please solve my problem. And is it possible to edit the attached database, please advice me.
    Thanks and Regards
    R. Vadivelan

  6. #6
    Join Date
    Oct 2013
    Posts
    163
    Dear Paul,

    I hope you had received my database. I am eagerly waiting for your reply to solve my problem.
    Thanks and Regards
    R. Vadivelan

  7. #7
    Join Date
    Oct 2013
    Posts
    163
    Dear Paul,

    I am looking forward to receive the reply from you...It will be quite useful for me. I had explained my requirements in the picture attached. Please let me know your comments
    Thanks and Regards
    R. Vadivelan

  8. #8
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Sorry, I haven't had a chance to work on it, and not being able to get into design view was part of it.
    Paul

  9. #9
    Join Date
    Oct 2013
    Posts
    163
    Thanks for your reply Paul. That's my problem too because I got this database as .accdr file. I understood from this forum that we can't edit the forms in .accdr file. Is their any other method to enable the design view, I got the .mdb file too but still its no use.

    So if possible could you please help me to explain how to make similar type of forms...I got something working with Master and Child transmittal method, but I would like to get open the form in New Window.
    Thanks and Regards
    R. Vadivelan

  10. #10
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You can use this to open a form to an existing record:

    http://www.baldyweb.com/wherecondition.htm

    To handle new records, you can use OpenArgs and code like this to populate the field:

    http://access.mvps.org/access/forms/frm0012.htm

    I'd try that in the open or load event of the form, using OpenArgs instead of the control's value.
    Paul

  11. #11
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Despite the .mdb file extension, when I try to open the file I get the 'unrecognized database format' that you usually get when trying to open a AC2010 or AC2013 file from AC2007.

    I also wonder about this statement:
    Quote Originally Posted by velu130486 View Post

    ...Now the problem is both the tables are having the same primary key...
    EmployeeID should not be the Primary Key for both Tables; it should be the Primary Key for the Main Form Table and the Foreign Key (defined as a Numbers Datatype) for the Table the Subform is based on.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  12. #12
    Join Date
    Oct 2013
    Posts
    163

    Required help in Opening Forms

    Dear Seniors,

    I would like to seek your help for my Project work in which I want to put access in use, since I am a new user I could not sort this issue. Attached herewith my database, in which I had created the forms to add data.

    I end successful in creating sub forms for adding data. However my requirement is when I click the command button in F00_MobPlan it should open F01_Timesheet1 in new window with records related to F00_Mobplan Sequential Number. Also the sequential number should appear in default for adding the data related to Timesheets. I had tried to create forms with some help but it always ask me to enter the sequential number when entering data.

    Please help me to sort out this issue.

    TEP_PAAFRegister.zip
    Thanks and Regards
    R. Vadivelan

  13. #13
    Join Date
    Oct 2013
    Posts
    163
    Dear Seniors,

    Can I have your help on the above subject Please.
    Thanks and Regards
    R. Vadivelan

  14. #14
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    when you open the form set a filter or where condition as apart of the call to the openform method
    http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx
    I'd rather be riding on the Tiger 800 or the Norton

  15. #15
    Join Date
    Oct 2013
    Posts
    163
    Thanks Healdem,

    I had managed to open the another form based on condition. Now I want to add the data through the second form. Both the forms are connected through Sequential number which is a primary key. Now my problem is whenever I add the data in the second form it always ask for the primary key to be entered.

    I would like to get the primary key auto fill every time when I add the data. It works fine when I use the subform option. But my colleague would like to get the form opened in new window for updating.

    Herewith I had enclosed the screen shot for your reference.
    Click image for larger version. 

Name:	Image.jpg 
Views:	2 
Size:	266.6 KB 
ID:	16068
    Thanks and Regards
    R. Vadivelan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •