Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    216

    Need help restructuring table and building a form


    I have eliminated all fields on my tblCalender that were also on another table. This reduced it from 15 fields to 3. Yes 3. The other 12 fields are on tblProposal. The data for those 12 fields originates from actions on the proposal form. The 3 remaining fields on blCalendar.are: (I have renamed it to tblCal_2025)
    1 fDate - a date field which contains the date for the work to be performed
    2 fLngLineNo - a long data type which already exists in the table, 101 to 120
    3 fLngProposalNo - a long data type that is unique to the one proposal
    I have no idea how to start the new calendar form. I need to display the job name on the calendar form. The fDate, fLngLineNo, and fLngProposalNo do not get displayed. It also requires additional fields from tblProposal such as fStrNotes which I currently have another field beside the name field which turns the backcolor black if the proposal has a note.
    My question is: How do I get the job name and other items on the calendar form. Oh, I cannot use the job name in place of the proposal number. There could be many proposals for a property. I hope I am not asking too much.
    tblCal_2025
    fDate fLngLineNo fLngProposalNo
    9/23/2025salNo 101 123002
    9/23/2025 102 20240805
    9/23/2025 103 20250928
    9/23/2025 104 20250891
    9/23/2025 105 20250714
    9/23/2025 106
    9/23/2025 107
    9/23/2025 108
    9/23/2025 109
    9/23/2025 110
    9/24/2025 101 123002
    9/24/2025 102 20240806
    9/24/2025 103 123002
    9/24/2025 104
    9/24/2025 105
    9/24/2025 106
    9/24/2025 107
    9/24/2025 108
    9/24/2025 109
    9/24/2025 110

  2. #2
    Join Date
    Apr 2017
    Posts
    1,792
    Depends on relation between proposals and jobs.

    In case every proposal may have a single job only (and either a job may belong to single proposal or to many of them), you can use a query with join between proposal and jobs tables (which returns info from both tables), and use it as source of proposals form;
    In case at least some proposal may have a several different jobs, you will need a jobs subform in your proposals form.

  3. #3
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    299
    I (still) do not understand what the use and meaning of the tblCalender is. Please explain. Having a year in a table name is usually a bed idea. It means you have to change forms, queries, reports, relationships every year.
    As I asked before, please show your datamodel or post a copy of your database.
    Groeten,

    Peter

  4. #4
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    430
    maybe the frmAppCalendar on this demo can be of use to you.
    Attached Files Attached Files

  5. #5
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    216
    The tblCalendar is just a table currently containing 15 fields. The table is the source of the form frmCalendar which I have attached a partial image of it. This is what I think I am trying to get to. But tblCalendar currently has 12 fields what are also in another table (tblProposal ). The 12 fields are selected or created in tblProposal from a form frmProposal. The frmCalendar is used to schedule jobs.

    I am studying the sample Calendar. I am not sure on it.

    The problem is, without all the 15 fields, how do I get the data on frmCalendar?
    See the attachment.
    Well, there is no attachment because I do not have the little paper clip symbol.

  6. #6
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    216
    Found it. The image is attached
    Attached Thumbnails Attached Thumbnails Current Calendar.jpg  

  7. #7
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    216
    I failed to answer one question above. The name tblCal_2025 is just a name. I have move the one, trying different things. The actual calendar is perpetual.

  8. #8
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    216
    I think I have found the answer. Make the record source a query!

  9. #9
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,818
    Hi
    This is jojo's db modified
    Attached Files Attached Files

  10. #10
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    216
    I really like the looks of that form mike60smart. I trying to study the code. I can't see what puts the data on the form. Can you help me there?

  11. #11
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    430
    to enter the data, you double-click on the White (yellow if it has schedule) textbox then an entry form will appear.
    to just view, click on the textbox and you can scroll up or down (if there are many entries).

  12. #12
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    216
    Thanks for your response jojowhite. I am talking about when the form opens. I see no record source on anything.

  13. #13
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    430
    on the Load event of the Form, it is calling show_number sub.
    after the code in show_sub is finish, it calls show_appointment sub.

    the Sub show_appointment() is the sub that is called to show the "appointments" for each day of a given month/year.
    it uses filtered recordset, and loop to each record.

  14. #14
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    430
    if you already have a calendar form, maybe you can upload the db and we will see
    how to modify it for your current Calendar table.

  15. #15
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    216
    I don't want to use my junk form. I love the form you sent. What type of field or container houses the appointment names? They are names do1 thru do42.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 05-11-2020, 04:58 PM
  2. Replies: 8
    Last Post: 08-31-2017, 05:42 PM
  3. Need help building a form
    By Cesar333 in forum Forms
    Replies: 1
    Last Post: 11-02-2016, 05:42 PM
  4. Replies: 5
    Last Post: 08-11-2014, 10:08 AM
  5. Need Help Building a small database
    By Darren in forum Access
    Replies: 1
    Last Post: 04-12-2012, 01:20 PM

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