Results 1 to 12 of 12
  1. #1
    Manass is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2013
    Posts
    7

    I can only add one record to my table

    In my database, i have a table tblStudent which keep student's details. I have created a form from this table using form wizard. The form contains buttons such Add record, delete record, Next Record, Previous record,..


    The problem is that the form is accepting only one record. After one record has been stores, when click for Add record, nothing happens. When entering records in the table view, they are able to be saved. However, only one record can be viewed from the form. When the Next Record command button is clicked, An error message appears "Your command isn't available"
    Any suggestions ?????????

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Want to provide db for analysis? Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    SteveH2508 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Location
    Chelsea, London, England
    Posts
    117
    Try changing the form's data entry property to No.

  4. #4
    Manass is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2013
    Posts
    7
    Quote Originally Posted by SteveH2508 View Post
    Try changing the form's data entry property to No.

    It was already set to No. Should I upload my database for you to look at it
    ???????

  5. #5
    Manass is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2013
    Posts
    7
    I upload my database for you to check
    ???????

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    I don't see any attachments to your posts??????

    The attachment manager is found under the Advanced Editor. Click 'Go Advanced' below the basic post editor window.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Manass is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2013
    Posts
    7
    Hello, i have uploaded my db
    Attached Files Attached Files

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Don't put the student fields on separate subforms. Bind the main form to tblStudent then organize fields directly on pages of tab control. Remove form for tblGuardian. Cannot have form for tblGuardian at the same level as form for tblStudent without doing some fancy tricks which I don't think is appropriate for your situation.

    Associating guardian with student is more complicated. Options:
    1. a combobox to select guardian from tblGuardian, if guardian record doesn't exist yet, use NotInList event of combobox to assist with adding new record
    2. a main form bound to tblGuardian and subform bound to tblStudent - enter guardian or go to existing guardian then enter/edit student records in subform
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Manass is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2013
    Posts
    7
    Could you not just help me a bit more please ?? I have to return my software on Monday. Its for my final cie examinations. Could you just change it yourself as I have tried but, in vain. I have remove the form for guardian 'frmguardian' and there is a main form for it with a combo box to search. The other form 'frmStudentDetails' contain a tab with 2 pages with subforms 'frmStudentGeneral' and 'frmStudentEmergency'.

    Is this the way you told me ????

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    No, do not use two subforms for tblStudent, use one form bound to tblStudent. Put a tab control on the form and put controls bound to tblStudent fields directly on the tab control. No subform unless you use option 2. Even then, all the controls for tblStudent would be on one form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Manass is offline Novice
    Windows 8 Access 2007
    Join Date
    Aug 2013
    Posts
    7
    Quote Originally Posted by June7 View Post
    No, do not use two subforms for tblStudent, use one form bound to tblStudent. Put a tab control on the form and put controls bound to tblStudent fields directly on the tab control. No subform unless you use option 2. Even then, all the controls for tblStudent would be on one form.
    Hmmm, I put all the fields on the tab directly on different tabs ???? if so, when I put some fields in one page of the tab..it appear on other pages of the tab.
    Im uploading the database,,Can you have a look ??????
    Attached Files Attached Files

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Putting controls on pages of tab is a little tricky. Have to make sure the page is actually selected, otherwise they just get dropped onto the form and will show no matter which page is active. Have to cut/paste existing controls or drag new ones from the design ribbon. So select and cut the control, select the page, paste.

    The emergency controls should also be directly on page of tab control, not within a subform.

    Need to set main form RecordSource.

    Still need to create combobox for selecting guardian.

    Don't think the guardian form will work as a subform to enter/edit guardian info. Remove the guardian subform. You can display the guardian controls directly on tab control page just for informational purpose but don't allow edit (actually, edits might be possible and will reflect for all associated students but CANNOT create new guardian record). Include tblGuardian in RecordSource with a join type of "Include all records from tblStudents ..."

    SELECT tblStudent.*, tblGuardian.*
    FROM tblGuardian RIGHT JOIN tblStudent ON tblGuardian.GuardianID = tblStudent.GuardianID;

    That RecordSource will result in multiple fields with same name (Home Phone, Mobile Phone, etc). ControlSources of textboxes will have to be revised to include the table name as prefix to designate which field to bind to. Select from the ControlSource dropdown list.


    Advise you not use spaces or special characters/punctuation (underscore is exception). The - and / symbols in field names are causing error when binding controls.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 03-09-2013, 10:39 AM
  2. Replies: 3
    Last Post: 02-06-2013, 07:23 PM
  3. Replies: 4
    Last Post: 08-14-2012, 07:14 AM
  4. Replies: 3
    Last Post: 08-09-2012, 01:49 PM
  5. Replies: 1
    Last Post: 04-24-2012, 02:36 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums