Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32

    Error Messages On Subforms, Access 2016

    Hi, I have a new database I'm trying to put together and have set up a couple of subforms that I'm having errors with. I've patterned them after another database that I have been working on that someone else set up a lot of it for me.



    The first error I'm getting is "The object doesn't contain the Automation object "PaymentMethodID". This is in the top subform.

    The second error I'm getting is "You tried to assign the Null value to a variable that is not a variant data type."

    Anyone out there willing to help me with this, please?CraftShows.zip

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    What is the purpose of the database? Can you tell us in plain English what it is trying to accomplish?
    Is this a db for craft show registrations? If so, where is the registrants table? I only see a table for the craft show itself.
    Is the db just for a single Craft Show?

    You have links in the Parent table pointing to the child tables. It should be the other way around. The parent table should typically not contain foreign keys.

  3. #3
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    Thanks for your response. It's a way for me to keep up with the shows I have joined. I need to know who the contacts are and what the hosts are expecting of me as well as how much I pay to attend. Does that make more sense?

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Does that make more sense?
    Yes, yes it does.
    Here's an improved version to get you going:
    davegri-CraftShows-v002.zip
    This replaces the version below that I uploaded last night. Added referential integrity and cascade deletes (so as to not leave orphans when you delete a show).
    Modified the Payment Method combobox dropdown source to be value list instead of listing previous entries in tblPaymentMethod.

    Note: unable to find a way to delete attachment below, but that's the old file...
    Last edited by davegri; 10-05-2017 at 08:45 AM. Reason: new attachment

  5. #5
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    Thank you so much! This is wonderful!

  6. #6
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Glad to help. Good luck with your shows!

  7. #7
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    I have a question. Why would the CraftShowID_FK go in tblNotes instead of a NotesID_FK going into the tblCraftShow?

  8. #8
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Table craftshow is the parent. The parent can have many children. The children must point back to the parent, not the parent pointing to the children.
    Think of it this way:
    A show can have many notes. How could one show record point to more than one note?
    But, any number of notes can point back to the show. Ah Ha!

  9. #9
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    Gotcha! Thank you.

  10. #10
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    I have come upon another problem:
    I am trying to use a subform - "Specs" on my main form "CraftShows" which I set up as a combo box with choices like Electricity (provided), Juried, Donation (needed), etc. I set it up as a continuous form (subform). I am able to add one record, but get the below error when I try to add the second. Do I have some kind of parameter set wrong? Any ideas? (P.S. I know the form is ugly, I'm not done yet) The problem is on the bottom most subform. When I am adding a different spec.

    Click image for larger version. 

Name:	Capture.PNG 
Views:	18 
Size:	53.7 KB 
ID:	30666

  11. #11
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    All these fields are in tblCraftShows are they not? So you don't need a subform. The subform wants to add a new record which you don't need. They can go on the frmCraftShows just like webaddress and ContactEmail.
    You can set up the combobox allowable values like I did with the Pymt Mthd combobox.

    If you have added a new table to hold the spec, then the above is not valid. However, you would only need a new table and subform if a show could contain more than one spec.

  12. #12
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    Thanks for your response: ok, but how would I get it to list them separately. i.e., there are several options in the combobox. I would need to have more than one for each record. Is there another way to do that? Also, the Pymt Mthd combobox is in a subform as well and works fine.

  13. #13
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    Also, I may do the same show year after year and would like for the payment information to show up from year to year too. Does that make sense?

  14. #14
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    So you do have a new table, tblSpecs and a show could contain more than one set of specs?

  15. #15
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    yes, and yes.

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

Similar Threads

  1. Replies: 3
    Last Post: 05-17-2018, 08:44 AM
  2. Replies: 1
    Last Post: 12-20-2016, 10:09 PM
  3. ODBC connection for Access 2016 - results in error
    By Ashish_Panchal in forum Access
    Replies: 3
    Last Post: 11-25-2016, 01:35 AM
  4. Custom messages to Access' default error messages.
    By evander in forum Programming
    Replies: 1
    Last Post: 06-26-2010, 02:06 AM
  5. Error Messages
    By DataGeek in forum Access
    Replies: 0
    Last Post: 12-06-2007, 09:56 AM

Tags for this Thread

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