Results 1 to 14 of 14
  1. #1
    gregh911 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    8

    Adding a field to a database


    Pretty much an Access noob here. I inherited a database for membership in a group I belong to. It was pretty much spelled out to me how to accomplish most tasks. The problem now is that we added a new membership level that I need to add to the database. I'm pretty sure I have added it OK, but cannot understand how to add it to a query properly. What I am working with is this; we have always had 1, 3 & 5 year memberships. We have now added a lifetime membership (called Dues For Life). The new field in the database is called DFL. When I try to add it to a query, it is not showing up in the results. Sorry if my terminology is off. I'm just trying to understand and everything I read is for building databases from scratch. Can someone point me in the right direction? Access for dummies? Thank you in advance.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    You should have a table that holds the values for membership terms....tMemTerms
    1 yr
    3
    5 yr
    Life
    in it ,just add new values when needed.

    in the user form to enter members, set a combo box to read this table to offer the options.
    nothing in your table design need change.

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,471
    I agree with ranman that it should be in 1 field. But are you saying that you have a query which has the table where you added the field and you selected that field and see it as a column in the query and when you run the query you do not see that field in the output? If so are you sure the Show box is checked on that column?

  4. #4
    gregh911 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    8
    Thank you for the quick replies. I'm sure that I'm in over my head here. ranman, your response sounds like a foreign language to me. Bulzie, yes the show box is checked. Where I'm having a problem is in the query because all the other memberships have an expiration date. This one does not. So I try to add the field to the query as an "or" (hope that makes sense), but when I run the query it doesn't show up.

  5. #5
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    Quote Originally Posted by gregh911 View Post
    Thank you for the quick replies. I'm sure that I'm in over my head here. ranman, your response sounds like a foreign language to me. Bulzie, yes the show box is checked. Where I'm having a problem is in the query because all the other memberships have an expiration date. This one does not. So I try to add the field to the query as an "or" (hope that makes sense), but when I run the query it doesn't show up.
    Debug...

    first copy the query to a new one, for testing.
    second make it a standard select query, ie no conditions, does this display all the data when you run it?
    if so then add any conditions one by one until it stops working as required, this will show you why it's not working. now get back to the forum with this information and see what people here can do then.

  6. #6
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,471
    At top left where you have option for Design View, Select SQL View, then copy and paste that code in here so we can take a look. Few more questions:
    Is the new field DFL an actual new field in a table or is it a checkbox in an option field? Or is DLF something you added to a value list that had the 1;3;5 values already?

  7. #7
    gregh911 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    8
    Quote Originally Posted by trevor40 View Post
    Debug...

    first copy the query to a new one, for testing.
    second make it a standard select query, ie no conditions, does this display all the data when you run it?
    if so then add any conditions one by one until it stops working as required, this will show you why it's not working. now get back to the forum with this information and see what people here can do then.
    I will give this a try. I've been so afraid of screwing up the existing database. thank you.

  8. #8
    gregh911 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    8
    Quote Originally Posted by Bulzie View Post
    At top left where you have option for Design View, Select SQL View, then copy and paste that code in here so we can take a look. Few more questions:
    Is the new field DFL an actual new field in a table or is it a checkbox in an option field? Or is DLF something you added to a value list that had the 1;3;5 values already?
    The DFL is a new field. The other memberships just have expiration dates, with no 1;3;5 value at all. I will get back with a copy of one of the queries I'm trying to add it to.

  9. #9
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,471
    I've been so afraid of screwing up the existing database. thank you.
    You should always have a good backup before doing any changes. Before doing anything else I would copy the database and append _011217 to it so you know it is from today. Then if something does not work you can always put the original one back. Hope you are using a linked BE database for the tables?

  10. #10
    gregh911 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    8
    OK here is one of the queries. Our group has many sub-groups (chapters). This query is run to give the chapter all their current members and their expiration dates. The -3 in the date field is because we have a 3 month grace period.

    SELECT [Big Giant Database].Group, [Big Giant Database].[File As], [Big Giant Database].Joined, [Big Giant Database].Expires, [Big Giant Database].Life, [Big Giant Database].[Label 1], [Big Giant Database].City, [Big Giant Database].Address, [Big Giant Database].St, [Big Giant Database].Zip, [Big Giant Database].Phone, [Big Giant Database].[E-Mail], [Big Giant Database].Number, [Big Giant Database].Life, [Big Giant Database].DFL
    FROM [Big Giant Database]
    WHERE ((([Big Giant Database].Group)="olympia") AND (([Big Giant Database].Expires)>DateAdd("m",-3,Date()))) OR ((([Big Giant Database].Life)="life") AND (([Big Giant Database].DFL)="DFL"))
    ORDER BY [Big Giant Database].Group, [Big Giant Database].[File As];

  11. #11
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,471
    So when you run that you get records and all those data columns except DLF column?

    AS trevor suggested, Run just this part and see if you get the DFL column:

    SELECT [Big Giant Database].Group, [Big Giant Database].[File As], [Big Giant Database].Joined, [Big Giant Database].Expires, [Big Giant Database].Life, [Big Giant Database].[Label 1], [Big Giant Database].City, [Big Giant Database].Address, [Big Giant Database].St, [Big Giant Database].Zip, [Big Giant Database].Phone, [Big Giant Database].[E-Mail], [Big Giant Database].Number, [Big Giant Database].Life, [Big Giant Database].DFL
    FROM [Big Giant Database]

  12. #12
    gregh911 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    8
    Quote Originally Posted by Bulzie View Post
    So when you run that you get records and all those data columns except DLF column?

    AS trevor suggested, Run just this part and see if you get the DFL column:

    SELECT [Big Giant Database].Group, [Big Giant Database].[File As], [Big Giant Database].Joined, [Big Giant Database].Expires, [Big Giant Database].Life, [Big Giant Database].[Label 1], [Big Giant Database].City, [Big Giant Database].Address, [Big Giant Database].St, [Big Giant Database].Zip, [Big Giant Database].Phone, [Big Giant Database].[E-Mail], [Big Giant Database].Number, [Big Giant Database].Life, [Big Giant Database].DFL
    FROM [Big Giant Database]
    Which brings up another dumb question, how do I enter and run a new query?

  13. #13
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    Browse through your tool bar at the top of the screen, if you have the query window open you should see an icon that is for running the query and display the results on the screen, mouse over each icon to find it, it should say "run', and perhaps a big exclamation icon.

  14. #14
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    the exclamation icon in the tool bar runs a query and displays the results on the screen

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

Similar Threads

  1. Replies: 7
    Last Post: 10-19-2016, 11:11 AM
  2. Replies: 3
    Last Post: 07-01-2016, 08:11 AM
  3. Replies: 2
    Last Post: 02-14-2016, 11:19 AM
  4. Replies: 3
    Last Post: 02-25-2015, 10:02 PM
  5. Replies: 8
    Last Post: 08-07-2013, 02:10 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