Page 3 of 3 FirstFirst 123
Results 31 to 44 of 44
  1. #31
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    No, teacher names do not have to already be in the table. This is what I described way back in post 6. Uses NotInList event to pop up the teacher form to enter new record then teacher is available for the booking record.



    The same can be done for school combobox.

    I used VBA code.

    ...there could be a LOT of names over time to have to choose from...

  2. #32
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Also do you take donations or anything? - this is great help and I do appreciate it

  3. #33
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    True, data does tend to accumulate. I have comboboxes with hundreds of items listed. Users must have some idea of what the data is to enter. A booking request should have this info submitted. Names tend to be tricky because of spelling variations, consistency is important. If teacher name Kate is entered in db as Cate, then might have hard time matching for next booking.

    I don't take pay. Like most contributors, am a volunteer participant. The forum site owner, on the other hand, might accept contribution.
    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.

  4. #34
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    It works for a while and then I get this.
    Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	36.1 KB 
ID:	13271

  5. #35
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Here's me trying to stuff around with the tables in another database...

    https://www.dropbox.com/s/t1effvpr4t62e94/Database2.zip

  6. #36
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    1. RecordSource for frmNewBooking - change to RIGHT JOIN
    SELECT tblTeacher.*, tblSchools.SchoolName FROM tblSchools RIGHT JOIN tblTeacher ON tblSchools.NewSchoolsID = tblTeacher.NewSchoolsID;

    2. SchoolName textbox should be Locked Yes, TabStop No

    3. Cannot enter data into tblJncTeacher and tblBookings with the same form. The subform should be bound to tblJncTeacher with a combobox to select booking record. If desired booking does not show in list then must open another form to enter booking record. Again, this is where the NotInList event of combobox is useful as demonstrated in the example db I posted.
    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. #37
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    1. RecordSource for frmNewBooking - change to RIGHT JOIN
    SELECT tblTeacher.*, tblSchools.SchoolName FROM tblSchools RIGHT JOIN tblTeacher ON tblSchools.NewSchoolsID = tblTeacher.NewSchoolsID;

    2. SchoolName textbox should be Locked Yes, TabStop No

    3. Cannot enter data into tblJncTeacher and tblBookings with the same form. The subform should be bound to tblJncTeacher with a combobox to select booking record. If desired booking does not show in list then must open another form to enter booking record. Again, this is where the NotInList event of combobox is useful as demonstrated in the example db I posted.
    ah. I see. So I can't just have the booking record made inside the subform on the fly... I have to make the booking available "first" and then select it. Yes the NotInList is helpful but then it would bring up a new window (which the end users won't appreciate). Ideally it would be nice if the tblJncTeacher could create a record (automatically) as I create the booking within the subform (as though you are just dealing with the booking table/form without the junction.)

  8. #38
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    That's the way it works. Why would users be troubled by another window? I am sure they have interacted with programs that have popups.

    How will user know what's available if they don't see list of existing bookings?
    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. #39
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by June7 View Post
    That's the way it works. Why would users be troubled by another window? I am sure they have interacted with programs that have popups.

    How will user know what's available if they don't see list of existing bookings?
    It's just efficiency. They don't need to see the bookings in this form - only need to make new ones. I'm making other forms to allow other staff add, view or edit the bookings.

  10. #40
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    What about having a subform within a subform? If that's even possible and would work, have the outer junction sub form hidden and hold the booking one...

  11. #41
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Also why is it my simple database I uploaded a few posts previously works fine when putting in a name and then selecting bookings in the submenu but my larger database with the same configuration (to my knowledge) does not? Is it because the subform has a qry as a source rather than a table or something like that?

  12. #42
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Form/subform/subsubform arrangement not appropriate because tblBookings is not a related child table of tblJncBookings. tblBookings is a lookup source for available bookings to select. Its records are not dependent on records in tblJncBookings. tblBookings can have records not yet associated with records in tblJncBookings.

    If your db is not working it is quite possibly because of the query. A form can use query, and is often advantageous to do so to manage sort order or to filter dataset when form opens, as RecordSource but the query must be structured properly. If it includes INNER JOIN to other table(s), that might prevent proper functioning.
    Last edited by June7; 07-31-2013 at 06:18 PM.
    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.

  13. #43
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    If that's all the case, how about one form to make the teacher, then have a "make bookings button" which opens up booking form and when it closes it relates back to that teacher?

    I don't know how or if this is possible because it would just be opening the booking form/table which is unrelated to the teacher table/form.

    I'm beginning to think it has nothing to do with the subform - I made a new form using just the bookings table - it won't allow me to add a new record. (also removed the relationship from the relationship table and I get the same error).

  14. #44
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    All that confusion for nothing. Turns out it was a no duplicates on a field I had made with a random number (I wanted each record to have a random number).

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

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