Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 55
  1. #31
    drunyan0824 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2022
    Posts
    82

    Quote Originally Posted by CJ_London View Post
    just a wild idea - how about

    MaintenanceDueDate
    MaintenanceCompletedDate

    Well, if you want to be simple about it...

  2. #32
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I don't like typing out long object names & figure that if you know the subject matter, you can keep it short as long as you don't end up using reserved words. If you don't know the subject is maintenance, then you don't belong poking around in the db. So for me, NextDue, PMDue, DueDate, anything short. Kind of obvious it's about dates when that's all you see in the form, report or table field? Even more intuitive if the recordsource sql defines the table: tblMaint.DueDate ?

    Whoever said that about basing forms on tables limiting functionality either doesn't know what they're talking about or you are taking it out of context - or there's one or more "functions" that can be used on a table but not a form and I have yet to learn about it. When you base a form on a table, you get ALL the records loaded and ALL (e.g.) 50 fields when you want 10 fields and 20 records. If you apply a filter to a table based form recordset you can trim the records you see, but you'll load them all first. Watch things slow down when you get to 100K or so records and 50 to 100 fields. In certain cases I would consider a table based form to be appropriate, such as when the number of records and fields loaded will be fairly small, which is often the case in a subform. My comment was about your main form so I wasn't generalizing there. In fact, I might be inclined to not load all equipment records into the main form but instead load the main and subs by choosing an equipment type or even a specific piece. It just depends on the process your db supports and how you want to interact with it.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #33
    drunyan0824 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2022
    Posts
    82
    I see what you are saying and I've changed and shorted table names and field names in my DB. I am however running in to a problem trying to base a form of a query. I created my query with all of the fields that I want on the main form. Then I created a form base of the query and I changed some of the text boxes to Combo boxes and the combo boxes worked once. Then after I closed the form and reopened the form I keep getting this error message when I click on the combo boxes.


    Click image for larger version. 

Name:	Combo Box Error.png 
Views:	19 
Size:	13.4 KB 
ID:	49392


    The Record Source for the form is

    Code:
    SELECT EquipTrack_QRY.*, EquipTrack_QRY.EquipCat FROM EquipTrack_QRY;
    I have also tried to just click on the EquipTrack_QRY in the Record Source drop down menu and get the same error.

  4. #34
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    not used to your naming convention so what's with the c in cEquipTrack as shown in the message? Personally, I would dispense with the _QRY and _Frm at the end. Don't you get tired of switching back and forth with capitalization and using the underscore so much? Common convention is frmMyFormNameHere; qryMyQueryNameHere and so on. Perhaps you'll get something out of these:
    Naming conventions - http://access.mvps.org/access/general/gen0012.htm
    https://www.access-programmers.co.uk...d.php?t=225837

    What not to use in names
    - http://allenbrowne.com/AppIssueBadWord.html
    You don't need to specify other fields from the same table if you use * wildcard.
    If your error is raised when clicking on combo, the issue is probably with its rowsource or controlsource properties. Textbox has no rowsource property so just doing a conversion like that won't provide rowsource (unless some control wizard prompted you for it, which I can't recall). Then again, the preceding "c" in the message doesn't seem to jive with what you show as the form sql.

    Could post another db if you remain stuck. Use the error messages as clues about what to look into.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #35
    drunyan0824 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2022
    Posts
    82
    Quote Originally Posted by Micron View Post
    not used to your naming convention so what's with the c in cEquipTrack as shown in the message?
    I have no idea what is with the cEquipTrack in the error message as that is no where in my naming scheme.

    Personally, I would dispense with the _QRY and _Frm at the end. Don't you get tired of switching back and forth with capitalization and using the underscore so much? [/QUOTE]

    Yes, I am going to start using the conventions in the links you provided.


    If your error is raised when clicking on combo, the issue is probably with its rowsource or controlsource properties.
    I tried to change the row source properties to:

    Code:
    Select[Mfr_TBL].[Company],[Mfr_TBL].[Company] From Mfr_TBL Order By [Company];
    I am trying to play around with the control source properties now. Equipment Tracking Test DB1_V2.zip


    Could post another db if you remain stuck. Use the error messages as clues about what to look into.
    I have attached the new db

  6. #36
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    How to replicate your issue? I'm not experiencing it.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #37
    drunyan0824 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2022
    Posts
    82
    Quote Originally Posted by Micron View Post
    How to replicate your issue? I'm not experiencing it.

    First I clicked on the EquipTrack_QRY then I clicked on the form button under the create tab to generate the from. Everything was text boxes so I converted the Company text box to a combo box and set the row source properties to
    Code:
    Select[Mfr_TBL].[Company],[Mfr_TBL].[Company] From Mfr_TBL Order By [Company];
    
    
    then I saved the form and reopened the form. Tried to access the combo box and that is where I get the error.

  8. #38
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    does this recordsource for that combo exist (never mind, I know it doesn't)

    =[tblMfr]![MrfID]

    because that's what you've set it to. As for the rowsource, you have Company field in there twice.
    Select[Mfr_TBL].[Company],[Mfr_TBL].[Company] From Mfr_TBL Order By [Company];

    Supposed to be the id field (ManufID and then Company field? If the table is about manufacturers then keep that theme going rather than use "Company" since a company need not be the manufacturer? Do note that using combos is best left for search forms because if anyone picks a different list item, that value gets changed whether it was intentional or not. Probably not a good thing to let it be enabled all the time. So if you stay with combo, best to disable it unless you're in add (or perhaps) edit record mode.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #39
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Well, that's not it either, in spite of the fact that you can't edit a calculated field (which is what that is).
    Still seems to be an issue with the form recordsource as the message indicates.

    EDIT - OK that's probably me because I changed a bunch of names. Changes propagated most places but not everywhere. I usually don't do that (and I turn off Auto Name Correct). So that's likely my current issue.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #40
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Take a look at this and the notes table. Maybe not how you'd lay it out, but at least I could see it on my laptop like this. See what you can glean from it.

    Equipment Tracking Test DB1_V3.zip
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  11. #41
    drunyan0824 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2022
    Posts
    82
    In looking at your database, I figure out how to resolve the error message that I was getting about the record source not existing. Now I am running into issues with values in my tblMfr getting over written or added when I don't need them added.


    If you open the form frmEquipTrack and change the selection in the Mfr combo box from Sony to Thor Broadcasting then move to a different record, the value on the tblMFr for Sony is changed form Sony to Thor Broadcasting. Also if you created a new record and select Sony in the Mfr Combo Box a new value is added to the tblMfr for Sony as well. I have notice that when I change the value of the comb box, the value for the MfrID doesn't change and I think that is where my issue is at the moment. I am guessing that this is a limitation of the combo box, but I am using a combo box because I don't want to have a long list box on the form to list every manufacture and I want a standardized list for our manufactures. I don't want someone to add a second piece of equipment from Thor Broadcasting as Thor Broad.

    I have attached my latest revision to my DB.
    Attached Files Attached Files

  12. #42
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    If you open the form frmEquipTrack and change the selection in the Mfr combo box from Sony to Thor Broadcasting then move to a different record, the value on the tblMFr for Sony is changed form Sony to Thor Broadcasting. Also if you created a new record and select Sony in the Mfr Combo Box a new value is added to the tblMfr for Sony as well.
    I warned you about that in post 38-ish.

    Do note that using combos is best left for search forms because if anyone picks a different list item, that value gets changed whether it was intentional or not. Probably not a good thing to let it be enabled all the time. So if you stay with combo, best to disable it unless you're in add (or perhaps) edit record mode.
    I have notice that when I change the value of the comb box, the value for the MfrID doesn't change
    You must be looking at the table while still on the edited but not saved record. There is no such limitation as you indicated.

    I think your solution is to provide a point from which you can direct flow - commonly referred to as a switchboard form, but I recommend not using the built in one if you have it in your version. So from such a form, you open the equipment tracking form in a mode (new, edit, review) and disable/enable controls accordingly. You can use option group or combos or anything else you want to use to drive this. IMO a whole whack of buttons is not the way to go, but that's just me.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  13. #43
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi

    I tend to use a Main Form / Subform approach.

    See the attached example.

    Your Lookup table lists contain some duplicated data.
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  14. #44
    drunyan0824 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2022
    Posts
    82
    Quote Originally Posted by Micron View Post
    I warned you about that in post 38-ish.



    You must be looking at the table while still on the edited but not saved record. There is no such limitation as you indicated.

    I think your solution is to provide a point from which you can direct flow - commonly referred to as a switchboard form, but I recommend not using the built in one if you have it in your version. So from such a form, you open the equipment tracking form in a mode (new, edit, review) and disable/enable controls accordingly. You can use option group or combos or anything else you want to use to drive this. IMO a whole whack of buttons is not the way to go, but that's just me.

    Yeah, I am seeing the problem with Combo Boxes. This is the first time that I have come across the problem, because I usually just use the wizard when I've made my combo boxes. I am using Office 365 so I don't have the option of the switch board forms, but I do have the option for Navigation Forms. Would you recommend using those or should I just try to create my own?

  15. #45
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I doubt that I'd ever use a nav form and I don't think I'm alone here with that sentiment, but I'm not saying I'd have 100% agreement. You'd need to understand their limitations, perhaps the biggest of which is that you can only open one form at a time. People have not realized that and started threads about why they can't get or pass values from one form that they opened when they switch. It's because the other one is now closed. Getting at the values in the forms is convoluted as well but it's doable.

    I see nothing wrong with using bound combos on forms for data entry only, or unbound for searching. If only some controls would be disabled, common approach is to
    - use control Tag property by giving it some sort of meaningful value (e.g. disable)
    - when form is opened from switchboard, the mode is passed to OpenArgs property of the form (e.g. read only)
    - loop over controls and if Tag property = disable, Enabled property is set to No.
    If all would be locked, use of OpenArgs sets form recordset to snapshot, thus can't be edited. Or loop as before without worrying about Tags but do worry about control type. You don't want to disable everything.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Calculate Date based on Past Date and Frequency
    By jchandler88 in forum Queries
    Replies: 9
    Last Post: 10-01-2018, 07:15 PM
  2. Replies: 3
    Last Post: 03-02-2016, 09:39 AM
  3. Replies: 1
    Last Post: 11-26-2013, 09:25 AM
  4. Replies: 1
    Last Post: 02-12-2013, 03:48 AM
  5. Replies: 34
    Last Post: 12-01-2011, 08:18 AM

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