![]() |
|
|
#1
|
|||
|
|||
|
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 05:50 AM. |
|
#2
|
|||
|
|||
|
I can't tell anything from your jpg. Post the database to get an answer to your question answered.
|
|
#3
|
|||
|
|||
|
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
|
|||
|
|||
|
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:
|
|
#5
|
|||
|
|||
|
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
|
|||
|
|||
|
Code:
Code:
Your're almost there. |
|
#7
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
"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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
What are the numeric digits to the left of " =" (without the quotation marks)?
Example Code:
Code:
Each of the other form control names in the subject also have a trailing numeric digit. I suspect each is incorrect. Code:
|
|
#15
|
|||
|
|||
|
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.
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |