Results 1 to 11 of 11
  1. #1
    thusgaard is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    12

    Key on multiple fields

    Hi

    I'm not sure where I should put this. So here it is in general Access.

    I'm trying to clean up a database and make sure that I don't make an error in future entrys.

    Is it possible to make a "key" that highlights the rows with matching keys. The thing is that a the "key" is Switchname + Switchport, data placed in 2 different colums in the same row.

    How do I do this? Is it possible?

    J;-)

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Can you give more details?
    For example:
    1. Where are you wanting to 'highlight' the 'key'?
    2. Are Switchname and Switchport - fields in a table?

  3. #3
    thusgaard is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    12
    Quote Originally Posted by Robeen View Post
    Can you give more details?
    For example:
    1. Where are you wanting to 'highlight' the 'key'?
    2. Are Switchname and Switchport - fields in a table?
    I didn't think it through...

    1. I want to highlight one of the fields, say the switchport field
    2. Switchname and switchport are fields in a table

    J;-)

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Where are you wanting to highlight the rows with matching keys??
    Is it in a Form, in a Report . . .

  5. #5
    thusgaard is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    12
    I enter data directly to the database, not nice but effective in my case... It would be nice to see it (I don't know the name of the view) in this view. But in a report would be nice as a test after entering data.

    Guessing that the report would just contain the ones that has problems....

    I'm such a noob

    J;-)

  6. #6
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Are you entering data directly into a Table?
    If that is the case, then I don't think it will be possible to highlight rows based on the values int the key fields. I don't know for sure because I have never tried to do anything like that in a Table.

    You can do things like highlighting when your data is being displayed in a Form or in a Report.

  7. #7
    thusgaard is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    12
    I enter directly to the table.
    I know this is bad.
    But is it possible to make a report?
    I'll just have to look at the report every once in a while.

  8. #8
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Entering directly into a Table is not ideal - but if it is only for YOU - and if you're careful - you may not need to bother with anything else.

    But - it is easy to create a Data Entry Form based on your Table. If you want to. It'll be a step towards getting your Database a little more efficient.

    Also - making reports is really easy.

    Go to Create -> Report Wizard and it will walk you through the steps of selecting your Table etc.

    Once you've created the report, you will have to size the boxes on the report etc.
    If you have Text fields in your Table that have a field size of 255 [the default] - then Access will try & give you a huge field to accomodate all 255 characters!!

    Once you have your report looking the way you want - you will want to use something called 'Conditional Formatting'.

    Let me know if you need more help - or you can read up on line. Just Google 'ms access conditional formatting'.

    All the best!

  9. #9
    thusgaard is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    12
    Say I have these fields
    Switchname, Switchport
    SW1, 1
    SW2, 1
    SW1, 1
    SW2, 2
    SW2, 3
    SW2, 3

    I want the report to show SW, 1 and SW2, 3
    How is this done?

  10. #10
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Do you mean:
    SW1, 1?

    What is the logic behind wanting to see:
    SW1,1
    SW2,3

    ?

    Are you trying to show the highest Switchport value for each Switchname?

  11. #11
    thusgaard is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    12
    They are the ones where the posts are double.
    The thing is that you can not use the same switchport twice, and I need to know when I have used the same port twice.

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

Similar Threads

  1. Update Multiple fields according multiple criterias
    By denis.m in forum Programming
    Replies: 1
    Last Post: 02-21-2011, 11:03 AM
  2. Replies: 4
    Last Post: 09-22-2010, 01:47 AM
  3. Replies: 1
    Last Post: 06-28-2010, 11:04 PM
  4. Replies: 1
    Last Post: 12-10-2009, 08:41 PM
  5. Populating multiple fields
    By jjcaprio in forum Programming
    Replies: 11
    Last Post: 08-16-2009, 01:51 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