Page 3 of 5 FirstFirst 12345 LastLast
Results 31 to 45 of 64
  1. #31
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    That should have triggered an error message. Names with spaces, special characters, punctuation (underscore is exception), or are reserved words need to be enclosed with []. Try:
    Me![site type] = Me.combo466.Column(2)



    Did you review my last post?
    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.

  2. #32
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Thanks I will try that June7. And yes I did review your last post and I replied that I needed a little more assistance with that part. What are your thoughts on this method?

  3. #33
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Ok entered exactly like this:

    !Me.[Site Type]<space>=<space>Me.Combo466.Column(2) and got the attached error when I selected a site from the drop down.

  4. #34
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The code needs to go in the VBA editor, not directly in the property. I think I posted a link about how to do that earlier in post 4?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #35
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Look at the last post (# 15) on page 1 of this thread. That is my reply to provide additional info for possible alternative.
    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.

  6. #36
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Pbaldy...I was using the Expression builder, that may be the issue then. June7 I will try your suggestion as well, but Im a little unclear as to the steps involved with that. Can I use the expression builder for that?

  7. #37
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    That did it...I used the code builder instead. I think we got a solve here! Let me try adding all my other fields and I will let you know the results. Thanks for sticking with me guys...GREAT help.

  8. #38
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    ok all is working....one last tweak though. It seems to be saving immediately to my table when I select the option from the drop down which creates a new record immediately. I would like to instead, have it auto-populate, but then only save after I finish entering the rest of the unique data on the form, when i click save record.

  9. #39
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    My suggestion does not save data and no expression is constructed and no code involved. It is simply joining tables to show related data. This avoids replication of data, if that is what you are actually doing.
    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.

  10. #40
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    well this db does require replication of data as each individual record will sometimes share data among the other records.

  11. #41
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Don't understand that response. The main principle of relational database is to NOT replicate data. But if you are satisfied with your construction, then please continue.
    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.

  12. #42
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Well my db keeps track of technicians, but it also contains all the info for the sites they support so that you can see everything that relates to that tech at a glance. We currently use multiple worksheets for all this data which makes it hard to go by. My thoughts were to use 1 source for all this data...so if there are say 3 techs that support the same site, all 3 techs will have the same managers and support contact info related to that specific site....hence a duplication of data is required if the db is primarily used to track by tech. I can find no other way around that.

  13. #43
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Then I suggest that your data structure might not be optimized. Each site can have more than one tech, okay get that. Also sounds like each tech can have more than one site. This is many-to-many relationship. Requires a third table to record associations.

    tblTechSite
    SiteID (foreign key)
    TechID (foreign key)

    If each tech can support only one site, then have field in tech table for the siteID.

    Either way, replication of data is eliminated.
    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.

  14. #44
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    there are a couple of tech's that work at multiple sites, but when that happens, I just have the city selection in the drop down as city\city\city. In these rare cases, they still have the same managers for those multi-sites, I just added additional fields for the additional addresses. But I like your idea of eliminating that...but it sounds a bit complicated for my level of experience. You're welcome to look at my data to analyze though....what would you need to see?

  15. #45
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    You could attach the project to post. Copy & remove confidential data if needed, leave in enough records just for test purposes, run Compact & Repair, zip if still large.

    Actually, a properly structured database should be simpler for a new user. Less possibility of having to resort to code and funky queries to get what you want.
    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.

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

Similar Threads

  1. Replies: 8
    Last Post: 12-05-2011, 01:55 PM
  2. Auto Populate two fields
    By funkygoorilla in forum Access
    Replies: 7
    Last Post: 08-31-2011, 09:06 PM
  3. Replies: 2
    Last Post: 12-07-2010, 12:32 PM
  4. auto populate mutiple fields
    By jomoan58 in forum Access
    Replies: 1
    Last Post: 07-23-2010, 01:03 PM
  5. Auto-Populate Combo box
    By vincenoir in forum Forms
    Replies: 3
    Last Post: 10-14-2009, 07:06 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