Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Also for database design.. we usually remove "s" off of tables.
    we already know it is more than one fee.. but you are storing a fee. So the table name is Fee.
    Everyone has a preference. I would name the table "Fees"; the table holds more than one Fee. BUT, I would have the PK "FeeID" (singular) because the PK refers to a single Fee. Same with the table "Cases". The table holds more than one "Case". I would name the PK field "CaseID" - the PK identifies one case.

    Along that line, I would suggest choosing a naming convention and sticking with it. Again, everyone has their own style (which changes with time). There are many naming conventions - Google "naming convention".

    Looking at the "Cases" table and the "Judges" table. Both table have a field named "JudgeID". In a query, form or report, it could get confusing as to which field you mean. To solve that, if the field is a PK, I add"_PK" to the end of the field name and "_FK" if it is a foreign key.
    The PK for the judges table would be "JudgeID_PK" and the judge field in the table "Cases" would be "JudgeID_FK".

    A friend and mentor showed me a different naming convention. Now it makes perfect sense to me.
    Lets take the table "Cases" as an example. I would rename it "Court Case Management". Then the primary key field would be "ccm_CaseID_PK". The prefix (first three letters) is the initials of the table name, the suffix is "PK" and the underscore separates the names. All of the fields in the table for the cases would have a prefix of "ccm_". It avoids the reserved word problem and you can tell which table the field is from.
    The judges table I might name "Judge_Name_Def" and the prefix would be "jnd_".
    Linking tables would be "People_Cases_lnk" (lnk = Link). the prefix would be "pcl_". OK enough of that....

    The main thing is to find a naming convention you like and try to stay with it.


    As far as your structure, I think it looks pretty good. I see you have made more mods... you'll probable make a few more


    So I have these comments:

    In table "CaseActions" - "Date" is a reserved word. It also is not very descriptive. "Date" of what?
    In tables "Cases", "CaseActions" and "People", I would think about having separate tables for the Notes. Would you ever want to enter more than one note for a case, case action or for a person? And I would add a date field to know when the note was entered.
    No spaces in names - excellent!

    Congratulations..... you are well on your way!

  2. #17
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    ssanfu is correct there are many opinions on best practices. Yes stick to a name convention if you can.

    one practice I use is in the key field for a table. I simply use ID therefore you don't have to add _pk to an obvious key.
    or s to end of your table names.

    but the beauty is it is your database so please do as you wish.

    I think as long as the job gets done and you get what you want great..

    Good luck to you. I hope you get your project completed..

  3. #18
    Mersad's Avatar
    Mersad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    10
    Thanks again. In regards to the naming I have to say again that English is not the language in which the database is being created, so all the problems with reserved words and naming conventions you guys pointed out are non-existent in the original database.

    I will however think about the notes and date suggestion you guys pointed out for the tables "Cases", "CaseActions" and "People".

    If I have further questions with the forms, etc. I'll come back here, but so far you have helped me out a lot! Thank you.

  4. #19
    Mersad's Avatar
    Mersad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    10
    I need a quick help actually. What is the proper builder code for the following:

    I have [FirstName], [LastName] and [Company]

    I want to create a builder that combines the three without commas, that would be

    [FirstName] & " " & [LastName] & " " & [Company]

    This works fine.

    But when there is no First Name and Last Name then I get two spaces before the Company name starts.

    I want to get rid of the spaces in the cases where there is no first and last name. Is there a code to do this?

    Thanks in advance.

  5. #20
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    [FirstName] & " " & [LastName] & " " & [Company]

    Trim(
    [FirstName] & " " & [LastName] & " " & [Company])

    Trim removes spaces... on the left of a string.

  6. #21
    Mersad's Avatar
    Mersad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    10
    Quote Originally Posted by alcapps View Post
    [FirstName] & " " & [LastName] & " " & [Company]

    Trim(
    [FirstName] & " " & [LastName] & " " & [Company])
    Thank you for the fast reply, but the code you provided does the same thing as before, by which I mean, when there is no first and last name entry, only a company, I get two spaces before the name of the company starts.

  7. #22
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    Sorry use rtrim()

  8. #23
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    Darn early. Ltrim()

  9. #24
    Mersad's Avatar
    Mersad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    10
    Quote Originally Posted by alcapps View Post
    Darn early. Ltrim()
    Hmm this is still not working for me, when I type it into the builder. I looked up some templates where Microsoft uses this and it's a much more complicated string... With lots of IIf and ifNull etc. Can't really figure it out
    Last edited by Mersad; 02-12-2013 at 07:54 AM.

  10. #25
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    firstname
    Lastname
    Company
    x
    joe smith acme plumbing joe smith acme plumbing
    jane jackson IBM jane jackson IBM
    jack
    first union jack first union

    Williams
    Williams


    Zero Zero
    jelly

    jelly


    SELECT Table1.firstname, Table1.Lastname, Table1.Company, LTrim([Firstname] & " " & [Lastname] & " " & [Company]) AS x
    FROM Table1;

    not sure what you're trying to do.. but take a look at this..

  11. #26
    Mersad's Avatar
    Mersad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    10
    Quote Originally Posted by alcapps View Post
    firstname
    Lastname
    Company
    x
    joe smith acme plumbing joe smith acme plumbing
    jane jackson IBM jane jackson IBM
    jack
    first union jack first union

    Williams
    Williams


    Zero Zero
    jelly

    jelly


    SELECT Table1.firstname, Table1.Lastname, Table1.Company, LTrim([Firstname] & " " & [Lastname] & " " & [Company]) AS x
    FROM Table1;

    not sure what you're trying to do.. but take a look at this..
    Sorry if this is a dumb question, but where exactly am I entering this string?

    I go to the table in Design view, go to the calculated filed, and then to General > Expression

    Open up the expression builder.

    But it doesn't let me enter this whole expression you wrote.

  12. #27
    alcapps is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    292
    make a new query.
    goto the the sql view
    paste in the query
    then switch to design mode and look at what happens.

  13. #28
    pscray is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jul 2015
    Posts
    3
    Would anyone be interested in creating a database for me, I can send you what I started. If so, please let me know your fees. Please see my relationship needs. The relationships are literally hindering me. I would like the ability to calendar also but I can play with that at a later date. Thanks in advance.
    Attached Thumbnails Attached Thumbnails relationship.PNG  

  14. #29
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    @pscray

    You have done what is termed "High jacking a thread". Because this thread is from Feb 2013, you will probably not get any responses.

    You should start a new thread (your own thread).

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

Similar Threads

  1. Replies: 6
    Last Post: 10-05-2012, 04:57 AM
  2. Pull All Cases of a Client
    By nevets in forum Reports
    Replies: 1
    Last Post: 02-22-2012, 08:08 PM
  3. Mulit-User Querying Database 250 people
    By nguyeda in forum Database Design
    Replies: 2
    Last Post: 06-09-2011, 07:10 AM
  4. Replies: 0
    Last Post: 12-28-2009, 12:14 PM
  5. Best way to organize a small database of people?
    By Orabidoo in forum Database Design
    Replies: 1
    Last Post: 06-09-2009, 10:13 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