Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147

    Split Form not working correctly

    My form has a combo box that updates 8 fields that does not change but about 12 in the main form require updating. I have a split form so I can see the records below when I enter new information but I can't get the records that I fill in to update below in the table. The other 12 or so text box information changes yearly that are updated manually.

    In the past they would just re-enter the new information loosing all previous information. I need to save all history. I like to setup where I can enter the information on the form then hit enter data command button so the information is stored in the table showen below.



    Attached is a picture of the form.
    Last edited by Brian62; 02-10-2010 at 08:50 AM.

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    I can't tell anything from your jpg. Post the database to get an answer to your question answered.

  3. #3
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    DB is attached.

    On the dropdown it updates 8 fields. The other fields I fill in myself. Ideally I would like to have an enter button to insert the updated data from the form to the table below that can not be updated unless I do some changes on the form. The dropdown is information that does not change. I add the dropdown info on anther form as new studies are started. I'm trying to show history for each study. On the dropdown the information should filter by the dropdown in the split form table. I hope that clarifies what I'm trying to do.

    I don't know if I have to do this in a tab format but I like this way better as it is easier to see all the information at once.

  4. #4
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    You problem is that combo box "Count" has no AfterUpdate event which I presume would populate the textboxes you refer to.

    Note that "Count" is an Access function. Rename field Count (before constructing the AfterUpdate event).

    I cannot tell which combo box column is stored where, therefore

    On the Count_AfterUpdate event execute the following code
    Code:
    me.YouNameTheApplicablecontrol1 me.count.column(1)
    me.YouNameTheApplicablecontrol2 me.count.column(2)
    me.YouNameTheApplicablecontrol3 me.count.column(3)
    me.YouNameTheApplicablecontrol4 me.count.column(4)
    me.YouNameTheApplicablecontrol5 me.count.column(5)
    me.YouNameTheApplicablecontrol6 me.count.column(6)
    me.YouNameTheApplicablecontrol6 me.count.column(7
    Notes that combo box columns are numbered 0,1,2,...N.

  5. #5
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    The combox data comes from tblCommitteeDataEntry and where I input the data through a form named FrmCommitteeDataEntry.

    I entered the code and changed the name to studyinfo and kept data type as number. Should it be Text? I am getting this compiling error:

    Private Sub Form_AfterUpdate() (Highlighted in Yellow)
    Me.id0 = Me.Studyinfo.Column(0)
    Me.PI1 = Me.Studyinfo.Column(1)
    Me.RDofficestudyno2 = Me.Studyinfo.Column(2)
    Me.RIPSinitialapprovaldate3 = Me.Studyinfo.Column(3)
    Me.SRSinitialapprovaldate4 = Me.Studyinfo.Column(4)
    Me.RIPSinitialapprovaldate5 = Me.Studyinfo.Column(5)
    Me.IRBinitialapprovaldate6 = Me.Studyinfo.Column(6)
    Me.RDinitialapprovaldate7 = Me.Studyinfo.Column(7)
    End Sub

    Is there something that I am missing in translation?

  6. #6
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Code:
    I entered the code and changed the name to studyinfo and kept data type as numberShould it be Text
    It should be whatever data type as is required. a numeric data type is ok.

    Code:
    Is there something that I am missing in translation
    You didn't understand. You are to specify the appropriate control name, I made up YouNameTheApplicablecontrol1, ..., YouNameTheApplicablecontrol7.

    Your're almost there.

  7. #7
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    I changed the name you gave me shown above based on the column names. In VB it's telling <mimatch type>.

    I'm trying every variation I can but no luck so far.

  8. #8
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    The data type of the data from the combo box column does not match the datatype of the form control where it's being stored, e.g. you might be storing text in a date control.

  9. #9
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    It's a splitform so the data type should be the same as the table that is being entered. The combobox is a mixture of text and dates. When you open the DB you will know what I mean. Thanks!

  10. #10
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    "splitform" is not a word of art for Access, that is, it has not well defined meaning to Access.

    Of course, data in the tale is displayed. I though that you wanted to put data from the 7 columns in the combo box into the table. That's what the code I ave you does, [provided that you chane to name of the target control as is appropriate.

    Is there still an unresolved issue?

  11. #11
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    Your correct. I am trying to put the data into the table from the combobox and the rest of the information that I input into the form. I matched the names in the combobox and the table names in the script.

    Did I write the script correctly in my last post?

    When I select from the combobox I only want that information to show and not all records that don't match the combobox information.

  12. #12
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Is the numeric digit at the end of each form control being stored into really there? I think not. I put a numeric digit at the end of each to differentiate between the form controls.

  13. #13
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    I'm not sure what your asking me to do but here is the script I wrote:

    I am getting a compiling error:

    Private Sub Form_AfterUpdate() (Highlighted in Yellow)
    Me.id0 = Me.Studyinfo.Column(0)
    Me.PI1 = Me.Studyinfo.Column(1)
    Me.RDofficestudyno2 = Me.Studyinfo.Column(2)
    Me.RIPSinitialapprovaldate3 = Me.Studyinfo.Column(3)
    Me.SRSinitialapprovaldate4 = Me.Studyinfo.Column(4)
    Me.RIPSinitialapprovaldate5 = Me.Studyinfo.Column(5)
    Me.IRBinitialapprovaldate6 = Me.Studyinfo.Column(6)
    Me.RDinitialapprovaldate7 = Me.Studyinfo.Column(7)
    End Sub

    When I select the a record form the combobox only the records from that combobox should be listed in the table (splitform) below. I need to keep a running history of the research that is on going.

    Remember this is a splitform within Access 2007. It is not a subform.
    I am completely confused. I know Access 2000 and 2003 but 2007 is completely different and is driving me crazy.

    I have attached the updated DB. Thanks for your help!

  14. #14
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    What are the numeric digits to the left of " =" (without the quotation marks)?

    Example
    Code:
    Me.id0 Me.Studyinfo.Column(0
    Shouldn't that be
    Code:
    Me.id Me.Studyinfo.Column(0
    that is, isn't the form control name is "id", not "id0"?

    Each of the other form control names in the subject also have a trailing numeric digit. I suspect each is incorrect.

    Code:
    The yellow bar means that there is a line of code which does not compileIt may or may  not be the line high-lighted
    Compile your code to see if it compiles. The Access compiler process stops at the first erroneous line. Fix each successive the error and recompile until the program compiles error free.

  15. #15
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    I tried that as well removing the 0 next to ID and still won't work. I have tried every variation and is driving me insane. I never had this problem in 2000 or 2003. Can you see if you can fix it on your end and post it for me if it isn't any trouble.

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

Similar Threads

  1. Split Form Sync up
    By jonsuns7 in forum Forms
    Replies: 1
    Last Post: 11-10-2009, 02:56 PM
  2. Subform not showing correctly
    By ricardo9211 in forum Forms
    Replies: 1
    Last Post: 08-27-2009, 07:49 AM
  3. Search field is not working correctly
    By jakeao in forum Programming
    Replies: 9
    Last Post: 05-18-2009, 07:47 PM
  4. Simple Nav Form Code Not Working
    By alsoto in forum Forms
    Replies: 10
    Last Post: 04-10-2009, 09:30 AM
  5. Can't display fields correctly....
    By benjamin in forum Database Design
    Replies: 0
    Last Post: 05-17-2006, 03:43 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