Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 36
  1. #16
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917

    Quote Originally Posted by balderman View Post
    OK so I should use the first name and last name fields from my customers table in the maint contract form? And no, it is not a form subform. I just want to be able to click on it from the customer profile/work order form/subform and have it open up separately and display the maint contract information (if there is any) or to be able to add a new record to start a maint contract for that customer
    You'll need to find a way to supply the Customer ID when you add a new record.

  2. #17
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    ok but the maint contract form is not a form/subform....it is just a form by itself....

  3. #18
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    So the ContractID and the CustomerID are the same value? That will work but it is problematic.

  4. #19
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    I am not even really using the contract ID form for anything I just put it there out of habit because I always feel like every table needs an ID field....perhaps I am wrong....I am trying something though, I added the customer ID field to the maint contract form and I am re-creating the form using the first name and last name fields from the customers table....and I changed the relationship linking the customer table to the maint contract table by customer ID....I am gonna see if that makes a difference and fixes the issue I am having

  5. #20
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    On your Customer Form, how do you get just that customer's contracts to show up in the SubForm?

  6. #21
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    You do know you can create a Query the jouns the Customer's table and the Contract table on the Customer ID and the Name Fields will be usable just as if they were in one table.

  7. #22
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    Quote Originally Posted by RuralGuy View Post
    On your Customer Form, how do you get just that customer's contracts to show up in the SubForm?
    On my customer's profile/ work orders form/sub form I created a button at the bottom with Form Operations- Open Form-Selected Maint Contract info form - then selected Open the form and find specific data to display, and then selected Last Name as the matching field to look up data.

  8. #23
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    Quote Originally Posted by RuralGuy View Post
    You do know you can create a Query the jouns the Customer's table and the Contract table on the Customer ID and the Name Fields will be usable just as if they were in one table.
    Right but then what would I do? Create a form from the query? Because I need the form to not only display the Customer's Maint Contract Info (if they have it, not all customer's have a maintenance contract) and to also add a new maintenance contract if they decide they want one....am I explaining this well enough to where it makes sense?

  9. #24
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Quote Originally Posted by balderman View Post
    I am not even really using the contract ID form for anything I just put it there out of habit because I always feel like every table needs an ID field....perhaps I am wrong...
    It is always a good idea for every table to have a primary key (PK). It is even better if it is an AutoNumber. It creates a special problem when you try to have two tables with the same PK and it is not necessary.

  10. #25
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    You create a form from a query just like it were a table, it just can do so much more work for you.

  11. #26
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Quote Originally Posted by balderman View Post
    On my customer's profile/ work orders form/sub form I created a button at the bottom with Form Operations- Open Form-Selected Maint Contract info form - then selected Open the form and find specific data to display, and then selected Last Name as the matching field to look up data.
    I'm sorry but I really do not follow that very well.

  12. #27
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    I am about to leave work...I will take screenshots and show you what I mean tomorrow.

  13. #28
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    okay...that works for me.

  14. #29
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    It was either go out and shovel snow or work on a dB..... guess what I chose???

    This is the table structures I would use:
    Click image for larger version. 

Name:	WorkOrderDB1.png 
Views:	12 
Size:	154.2 KB 
ID:	31749
    Any field with a suffix of "_PK" is an autonumber type field and is the PK.
    Any field with a suffix of "_FK" is a Long Integer type field.



    Just my $0.02.........................

  15. #30
    balderman is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2017
    Posts
    55
    I have the customer/work orders working perfectly and exactly the way I want them so I do not want to make any changes to those....the Service type, Property type, contract type, etc...those are drop down boxes to select from.....

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

Similar Threads

  1. Replies: 5
    Last Post: 01-08-2015, 02:08 PM
  2. CDate and CStr issue with "Invalid Use of Null" Issue
    By excellenthelp in forum Queries
    Replies: 3
    Last Post: 07-25-2014, 01:34 PM
  3. Replies: 22
    Last Post: 05-21-2013, 07:54 PM
  4. problems please help
    By stryder09 in forum Access
    Replies: 1
    Last Post: 02-15-2011, 02:24 PM
  5. Replies: 1
    Last Post: 03-31-2010, 11:57 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