Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Access

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 02-09-2010, 09:30 AM
Brian62 Brian62 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Aug 2009
Posts: 85
Brian62 is on a distinguished road
Default 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.
Attached Images
File Type: jpg DB.jpg (193.4 KB, 13 views)

Last edited by Brian62; 02-10-2010 at 05:50 AM.
Reply With Quote
  #2  
Old 02-09-2010, 05:02 PM
llkhoutx llkhoutx is offline Windows Vista Access 2007 (version 12.0)
Expert
 
Join Date: Jan 2010
Location: Houston, Texas USA
Posts: 340
llkhoutx is on a distinguished road
Default

I can't tell anything from your jpg. Post the database to get an answer to your question answered.
Reply With Quote
  #3  
Old 02-10-2010, 07:32 AM
Brian62 Brian62 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Aug 2009
Posts: 85
Brian62 is on a distinguished road
Default

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.
Attached Files
File Type: zip Database2.zip (102.6 KB, 2 views)
Reply With Quote
  #4  
Old 02-10-2010, 11:47 AM
llkhoutx llkhoutx is offline Windows Vista Access 2007 (version 12.0)
Expert
 
Join Date: Jan 2010
Location: Houston, Texas USA
Posts: 340
llkhoutx is on a distinguished road
Default

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.
Reply With Quote
  #5  
Old 02-10-2010, 12:07 PM
Brian62 Brian62 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Aug 2009
Posts: 85
Brian62 is on a distinguished road
Default

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?
Reply With Quote
  #6  
Old 02-10-2010, 01:28 PM
llkhoutx llkhoutx is offline Windows Vista Access 2007 (version 12.0)
Expert
 
Join Date: Jan 2010
Location: Houston, Texas USA
Posts: 340
llkhoutx is on a distinguished road
Default

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.
Reply With Quote
  #7  
Old 02-10-2010, 01:32 PM
Brian62 Brian62 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Aug 2009
Posts: 85
Brian62 is on a distinguished road
Default

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.
Reply With Quote
  #8  
Old 02-10-2010, 01:35 PM
llkhoutx llkhoutx is offline Windows Vista Access 2007 (version 12.0)
Expert
 
Join Date: Jan 2010
Location: Houston, Texas USA
Posts: 340
llkhoutx is on a distinguished road
Default

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.
Reply With Quote
  #9  
Old 02-10-2010, 01:43 PM
Brian62 Brian62 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Aug 2009
Posts: 85
Brian62 is on a distinguished road
Default

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!
Reply With Quote
  #10  
Old 02-10-2010, 01:47 PM
llkhoutx llkhoutx is offline Windows Vista Access 2007 (version 12.0)
Expert
 
Join Date: Jan 2010
Location: Houston, Texas USA
Posts: 340
llkhoutx is on a distinguished road
Default

"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?
Reply With Quote
  #11  
Old 02-10-2010, 01:55 PM
Brian62 Brian62 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Aug 2009
Posts: 85
Brian62 is on a distinguished road
Default

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.
Reply With Quote
  #12  
Old 02-10-2010, 01:59 PM
llkhoutx llkhoutx is offline Windows Vista Access 2007 (version 12.0)
Expert
 
Join Date: Jan 2010
Location: Houston, Texas USA
Posts: 340
llkhoutx is on a distinguished road
Default

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.
Reply With Quote
  #13  
Old 02-12-2010, 06:46 AM
Brian62 Brian62 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Aug 2009
Posts: 85
Brian62 is on a distinguished road
Default

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!
Attached Files
File Type: zip Database2.zip (422.6 KB, 1 views)
Reply With Quote
  #14  
Old 02-12-2010, 07:08 AM
llkhoutx llkhoutx is offline Windows Vista Access 2007 (version 12.0)
Expert
 
Join Date: Jan 2010
Location: Houston, Texas USA
Posts: 340
llkhoutx is on a distinguished road
Default

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.
Reply With Quote
  #15  
Old 02-12-2010, 07:17 AM
Brian62 Brian62 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Aug 2009
Posts: 85
Brian62 is on a distinguished road
Default

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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Split Form Sync up jonsuns7 Forms 1 11-10-2009 11:56 AM
Subform not showing correctly ricardo9211 Forms 1 08-27-2009 05:49 AM
Search field is not working correctly jakeao Programming 9 05-18-2009 05:47 PM
Simple Nav Form Code Not Working alsoto Forms 10 04-10-2009 07:30 AM
Can't display fields correctly.... benjamin Database Design 0 05-17-2006 01:43 PM


All times are GMT -8. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.