Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664

    I am the one going blind, I must have grabbed the wrong zip file to extract the file.


    Found the correct file. looking now.

  2. #17
    kieranharrison is offline True blue Aussie m8
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Queensland, Australia
    Posts
    28
    Thanks for answering that one ssanfu.

    In the new SQL code I cannot use spaces though right? It keeps telling me there is a misspelled word.

    I was trying to use this (for example) ||| SELECT received_files_table.Processing_Month AS Processing Month, received_files_table.IATA_Code AS IATA Code,

    But it will only let me use it without spaces or like this ||| SELECT received_files_table.Processing_Month AS Processing_Month, received_files_table.IATA_Code AS IATA_Code,

  3. #18
    kieranharrison is offline True blue Aussie m8
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Queensland, Australia
    Posts
    28
    haha no worries thanks for taking a look! The one you should be viewing says 'final' at the end of the filename.

    Also, why do you not recommend using * for all fields? isn't it easier than having to list them all?

  4. #19
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I read somewhere long ago that using "received_files_table.*" could cause problems with the query. So I explicitly add the fields I want. Just a double click on each field or select a group of fields (not the *) and drag and drop them on the grid.
    Also you have th add a field again if you want to filter by a specific field or sort by one or more fields. It is habit now.




    I added a table and modified the form "frmReceievedFiles" (and renamed it)
    This way you don't have to edit the dB each time the year changes.

    By changing the year in the text box TheYear, the combo box "processing month" options change. I set the the text box default the the current year. So next year the year would automatically be 2020.


    BTW, Check the spelling in the header of form "frmReceievedFiles"....
    (I'm still looking at the dB)
    Attached Files Attached Files

  5. #20
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You don't have cascading combo boxes set up for the Airports and Airlines?

  6. #21
    kieranharrison is offline True blue Aussie m8
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Queensland, Australia
    Posts
    28
    Thanks very much ssanfu!!

    Can I just ask a couple questions so I understand crystal clear;

    1. Why have all the forms been renamed? Is it so that if you change the 'year' field you added in the 'ReceivedFiles' form all of the 'processing month' combo box options will update in the other two forms? (if not, how can I replicate the 'year' field you have done?)
    2. Is there any point in me keeping my original 'processing_month_dir' table if you have made a copy? Do the combo boxes in the forms link to your copy table or my original?
    3. If the 'processing month' fields in the forms are linking to my original 'processing_dir_table' and I go change the combo box, will your 'year' field still work?
    4. What is happening in 'Query1' ?? Is this driving the 'year' field?

    haha noted on the spelling.. woops.

  7. #22
    kieranharrison is offline True blue Aussie m8
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Queensland, Australia
    Posts
    28
    ++ this is my first ever access database. I have no idea how cascading combo boxes work #rookiehour

  8. #23
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Advise not to use spaces/punctuation/special characters (underscores ok) in names, including queries, forms, reports.

    Yes, can use alias names in query but why bother unless it is a calculated field? You can use whatever text you want in labels on forms and reports.

    If you use spaces or punctuation (except for underscore) must enclose in [].

    SELECT received_files_table.Processing_Month AS [Processing Month]

    Cascading comboboxes is a very common topic. A quick search will return a multitude of threads.
    Last edited by June7; 06-28-2019 at 12:32 AM.
    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. #24
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    June answered most of your questions, but I'll also respond.

    Quote Originally Posted by kieranharrison View Post
    1. Why have all the forms been renamed?
    The form names were overly long and had spaces and special characters in them.

    Object names should be letters and numbers.
    Do not begin an object name with a number.
    NO spaces, punctuation or special characters (exception is the underscore) in object names

    Object names include fields, tables, queries, forms, modules and reports.

    I would also take the time to rename controls rather than use the names Microsoft gives controls. "cboProcessingMth" is way better than "Combo86". (on form frmReceievedFiles)



    Quote Originally Posted by kieranharrison View Post
    2. Is there any point in me keeping my original 'processing_month_dir' table if you have made a copy?
    I created the table copy because I only modified 1 form (as a demo). The other forms are still using the original table.
    Note the difference in the two table structures. Your design is known as "Committing spreadsheet". The table design is like a spreadsheet.
    Spreadsheets are typically short and wide. RDBM tables are typically tall and narrow.




    Quote Originally Posted by kieranharrison View Post
    3. If the 'processing month' fields in the forms are linking to my original 'processing_dir_table' and I go change the combo box, will your 'year' field still work?
    As long as you set up the combo box on the other forms the same way I did in the received form. You could rename the table I created and change the combo box row source to use the new table name.




    Quote Originally Posted by kieranharrison View Post
    4. What is happening in 'Query1' ??
    Whoops.... That was a test ... I should have deleted it.



    As June said, Cascading combo boxes is a very common topic.



    Note: noting I've posted is meant to burn you. In fact, I think it is great that you asked for advice and are asking questions.

  10. #25
    kieranharrison is offline True blue Aussie m8
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Location
    Queensland, Australia
    Posts
    28
    Ahhh okay, I understand now! I'll make some adjustments.

    Thanks very much again for your help June & Ssanfu, I really appreciate it!!
    No offence taken ssanfu, this is my very first Access DB so all of your help has been very valuable. Without you guys I would still be extremely lost

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

Similar Threads

  1. How to halt continued execution
    By GraeagleBill in forum Programming
    Replies: 3
    Last Post: 01-04-2016, 09:48 PM
  2. Execution error 3464
    By Trisha in forum Access
    Replies: 3
    Last Post: 03-03-2014, 01:03 PM
  3. Inconsistent Code Execution
    By Paul H in forum Forms
    Replies: 2
    Last Post: 09-19-2011, 10:06 AM
  4. VBA + SQL statement creation/execution.
    By Playerpawn in forum Access
    Replies: 3
    Last Post: 05-26-2011, 08:25 AM
  5. Pausing macro execution
    By lupis in forum Programming
    Replies: 3
    Last Post: 06-28-2010, 12:46 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