Results 1 to 7 of 7
  1. #1
    archy321 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    17

    Expression builder help

    Hello



    I apologize in advance for the very noob question. I am trying to make a calculated field and having trouble coming up with a correct expression. Something like:
    If ID isNOTnull then type location into into calculated field.

    Any help is greatly appreciated!

    V/R
    Archy

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Sorry, don't understand. Cannot 'type' into a calculated field. It's a calculation.
    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
    archy321 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    17
    I guess what i was looking for was for it to autofill with a specific text with each new record

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    And where would that text come from? User input? Cannot do that with calculated field in table. And even if you do it in query, every record that meets the condition will show the same input.
    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.

  5. #5
    archy321 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    17
    Soo... kind of embarrassing... ends up i was trying to hammer a nail in with a sledgehammer last night. What i was trying to do was have two tables and have the fields automatically enter in their location depending on which table they entered the information in. All i really needed was to make a look up field with a default value of their location I.E. LA table automatically enters in LA and San Diego Table automatically enters in San Diego with each new record created. Thank you for taking the time to look into my question!

    V/R
    Archy

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    If tables have location in their name, why would you need to bother with a field that has same value for every record?

    Why do you even have separate tables? Do these tables have same structure? If so, sounds like should be one table with a field for location. Then having Location field makes sense.
    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
    archy321 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    17
    There's a couple of reasons for the separate tables. There are coordinators at both locations and I wanted to make sure that they didn't accidentally input information for the opposing location. I also didn't want them to be over inundated with information that they didn't need to see as the tables in question are going to actually be SharePoint calendars. The higher ups can combine the calendars on their outlook calendars, but the two location coordinators will only have access to their own locations data. The higher-ups also want to see the schedules for both locations on one sheet, which required that I make a union query, but when I made a union query the differences between the two tables disappeared... I probably did something wrong, but I'm here now haha. The higher-ups also wanted the form to be in a specific layout...something like this...

    LA first shift
    San Diego first shift

    LA second shift
    San Diego second shift

    Adding in the field allowed me to group the report to look like the above...so it would look something like

    Group on caldate
    Sort by shift
    Sort by location

    And with a little bit a tweaking I was able to get the report to look how they wanted it!

    I hope I didn't do anything wrong and any suggestions would be greatly appreciated!

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

Similar Threads

  1. Expression Builder
    By geocan2006 in forum Access
    Replies: 6
    Last Post: 05-25-2016, 04:21 PM
  2. Replies: 4
    Last Post: 05-03-2016, 01:51 PM
  3. Replies: 2
    Last Post: 11-20-2012, 03:21 AM
  4. Expression builder
    By PJ_d_DJ in forum Access
    Replies: 2
    Last Post: 02-24-2011, 03:38 AM
  5. Expression Builder
    By mistaken_myst in forum Access
    Replies: 2
    Last Post: 05-07-2008, 01:30 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