If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
OK.. i got the record to save.. the main form information anyway.. not the
subform info. yet.. i still can't even select a value from the combo box on the subform.. i can see them and scroll through them.. but if i try and select one.. it does nothing.. no error either.. but i am feeling better.. now that i have made some progress.. thanks again.. for your time steve! "Steve Schapel" wrote: Jenn, The only reason I know of for this happening is if there is a "required" field which hasn't had data entered into it, or a Validation Rule set within the form or the table that hasn't been complied with in the data which was entered. The use of an AUtonumber ID field shouldn't have any effect. If you have the form set up correctly, then any new record entetred should automatically be saved to the table when the form is closed, or you move to a new record, or you move the focus to the subform. -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: yea.. those properties are set to yes.. but i thought i'd test out the main form.. so i made a acopy of it and deleted the sub form.. i guess i have something set up wrong on the main form.. bc when i close out of that form 9w/out the sub form my entry isn't saved.. is there something i have to specifically set/code with the ID number being an auto-number (system generated)? my form's recordset property is set to the table where i want the info. saved.. i'll see what i can come up with.. thanks! - Jenn |
#12
|
|||
|
|||
c
"Steve Schapel" wrote: Jenn, The only reason I know of for this happening is if there is a "required" field which hasn't had data entered into it, or a Validation Rule set within the form or the table that hasn't been complied with in the data which was entered. The use of an AUtonumber ID field shouldn't have any effect. If you have the form set up correctly, then any new record entetred should automatically be saved to the table when the form is closed, or you move to a new record, or you move the focus to the subform. -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: yea.. those properties are set to yes.. but i thought i'd test out the main form.. so i made a acopy of it and deleted the sub form.. i guess i have something set up wrong on the main form.. bc when i close out of that form 9w/out the sub form my entry isn't saved.. is there something i have to specifically set/code with the ID number being an auto-number (system generated)? my form's recordset property is set to the table where i want the info. saved.. i'll see what i can come up with.. thanks! - Jenn |
#13
|
|||
|
|||
Jenn,
Well, I guess that's progress. Strange about the subform. Can you let us know the name of the fields in the subform, the settings you have for the subform's Link Child Fields and Link Master Fields properties, and details of the combobox on the subform... which field it is bound to, and what is its RowSource? What happens if you try to enter something in the other textbox on the subform? Is the subform based on a table or a query? If a query, can you open the query independently and enter a new record in there? -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: OK.. i got the record to save.. the main form information anyway.. not the subform info. yet.. i still can't even select a value from the combo box on the subform.. i can see them and scroll through them.. but if i try and select one.. it does nothing.. no error either.. but i am feeling better.. now that i have made some progress.. thanks again.. for your time steve! |
#14
|
|||
|
|||
Hi Steve..
The subform field names a "txtAccount", "txtAmount", "txtTotalAmount". The settings I have for the subform's Link Master field property is "ID" (when I add "ID" to both the child and master field the subform doesn't look right (within the main form.. when run.. it doesn't even make the combo box and amount fields visible). The subform's record source is set to tblCheckReqAmtsToAccts (table where I want the accts/amounts saved to). The account combobox's rowsource is a select statement (selects account numbers from tblAccounts table) and the txtAmount field is a text field that the user enters in. Both of these fields' control source is set to nothing.. because if I set them to the field name (of the table where I want them stored - tblCheckReqAmtsToAccts) I get a list of all the current acct/amts entries in the table. I also just realized that when I set either link child or link master - the main form doesn't let me make any selections (I'e. I see the drop-down values but when I go to highlight one it doesn't accept it.. no error.. just won't accept). Wait.. this may be the obvious problem.. I don't have this "ID" field anywhere on my subform.. (or my main form for that matter) it is in the subform's table (where I want to info. stored) but nowhere on the subform.. should I create a "ID" textbox and just male the visible propery = false.. because I don't want it shown on the screen. Thanks Steve! - Jenn -----Original Message----- Jenn, Well, I guess that's progress. Strange about the subform. Can you let us know the name of the fields in the subform, the settings you have for the subform's Link Child Fields and Link Master Fields properties, and details of the combobox on the subform... which field it is bound to, and what is its RowSource? What happens if you try to enter something in the other textbox on the subform? Is the subform based on a table or a query? If a query, can you open the query independently and enter a new record in there? -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: OK.. i got the record to save.. the main form information anyway.. not the subform info. yet.. i still can't even select a value from the combo box on the subform.. i can see them and scroll through them.. but if i try and select one.. it does nothing.. no error either.. but i am feeling better.. now that i have made some progress.. thanks again.. for your time steve! . |
#15
|
|||
|
|||
I did just realize that when i TRY to do something in the
subform (like selecting an acct from the drop-down).. i can then no longer select anything in the main form. -----Original Message----- Jenn, Well, I guess that's progress. Strange about the subform. Can you let us know the name of the fields in the subform, the settings you have for the subform's Link Child Fields and Link Master Fields properties, and details of the combobox on the subform... which field it is bound to, and what is its RowSource? What happens if you try to enter something in the other textbox on the subform? Is the subform based on a table or a query? If a query, can you open the query independently and enter a new record in there? -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: OK.. i got the record to save.. the main form information anyway.. not the subform info. yet.. i still can't even select a value from the combo box on the subform.. i can see them and scroll through them.. but if i try and select one.. it does nothing.. no error either.. but i am feeling better.. now that i have made some progress.. thanks again.. for your time steve! . |
#16
|
|||
|
|||
Jenn,
You will have to set the Control Source of the combobox and textbox on the subform to the txtAccount and txtAmount fields in the table. The fact that you see all the records is to be expected, and the solution is to get the main/subform link working properly, not to make the controls unbound! What is the story with the txtTotalAmount field? And are there any other fields in the tblCheckReqAmtsToAccts table which are not represented on the subform? It should not be necessary to put a hidden control on the subform bound to the ID field... but not a bad idea to do so, I always do this in such cases just to help make it easier to see what's going on. Plus you can make it visible in the meantime while trying to track down the problem. But it would certainly be a good idea to put the ID field from the main table on the main form. What is the data type of the ID field in the main table? And what is the data type of the ID field in the tblCheckReqAmtsToAccts table? We will get this figured out eventually! -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: Hi Steve.. The subform field names a "txtAccount", "txtAmount", "txtTotalAmount". The settings I have for the subform's Link Master field property is "ID" (when I add "ID" to both the child and master field the subform doesn't look right (within the main form.. when run.. it doesn't even make the combo box and amount fields visible). The subform's record source is set to tblCheckReqAmtsToAccts (table where I want the accts/amounts saved to). The account combobox's rowsource is a select statement (selects account numbers from tblAccounts table) and the txtAmount field is a text field that the user enters in. Both of these fields' control source is set to nothing.. because if I set them to the field name (of the table where I want them stored - tblCheckReqAmtsToAccts) I get a list of all the current acct/amts entries in the table. I also just realized that when I set either link child or link master - the main form doesn't let me make any selections (I'e. I see the drop-down values but when I go to highlight one it doesn't accept it.. no error.. just won't accept). Wait.. this may be the obvious problem.. I don't have this "ID" field anywhere on my subform.. (or my main form for that matter) it is in the subform's table (where I want to info. stored) but nowhere on the subform.. should I create a "ID" textbox and just male the visible propery = false.. because I don't want it shown on the screen. Thanks Steve! - Jenn |
#17
|
|||
|
|||
I did take your advice on setting the combobox and textbox
control source set to the table account and amounts field. This does make sense to me because this is how I set up the main form screen (and it saves the info. like it should). What does not make sense to me is when you say 'the fact that you see all the records is to be expected'.. I don't understand because this is for the user to select an account (from the drop-down box - values from my accounts table) and for the user to manually enter the amount in (for that account) and then this information get added to my CheckReqAmtsToAccounts table. The txtTotalAmount field is placed in the footer of my subform.. I want this field to sum up the account amounts (as they enter them in). The only fields in my CheckReqAmtsToAccounts table are ID, Amount, Date (this value = CurrentDate), and AcctNumber. I also added the ID field to both forms (main and sub) and for now.. like you said.. I made them visible.. to see what's going on. The main form's ID is good.. it's the next # (auto-number) but the ID field in my sub-form is no good.. I think because of me setting it's control source to my ID field in the table (CheckReqAmtsToAccounts). this value is the value of the first record in that table.. but instead it should match the main form ID (which is a new ID #). The ID field in my CheckRequests table is defined as autoNumber (primary key, no duplicates allowed) and the ID field in the CheckReqAmtstoAccounts field is defined as a number (NOT SET AS primary key, duplicates ok). Thanks Steve! -----Original Message----- Jenn, You will have to set the Control Source of the combobox and textbox on the subform to the txtAccount and txtAmount fields in the table. The fact that you see all the records is to be expected, and the solution is to get the main/subform link working properly, not to make the controls unbound! What is the story with the txtTotalAmount field? And are there any other fields in the tblCheckReqAmtsToAccts table which are not represented on the subform? It should not be necessary to put a hidden control on the subform bound to the ID field... but not a bad idea to do so, I always do this in such cases just to help make it easier to see what's going on. Plus you can make it visible in the meantime while trying to track down the problem. But it would certainly be a good idea to put the ID field from the main table on the main form. What is the data type of the ID field in the main table? And what is the data type of the ID field in the tblCheckReqAmtsToAccts table? We will get this figured out eventually! -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: Hi Steve.. The subform field names a "txtAccount", "txtAmount", "txtTotalAmount". The settings I have for the subform's Link Master field property is "ID" (when I add "ID" to both the child and master field the subform doesn't look right (within the main form.. when run.. it doesn't even make the combo box and amount fields visible). The subform's record source is set to tblCheckReqAmtsToAccts (table where I want the accts/amounts saved to). The account combobox's rowsource is a select statement (selects account numbers from tblAccounts table) and the txtAmount field is a text field that the user enters in. Both of these fields' control source is set to nothing.. because if I set them to the field name (of the table where I want them stored - tblCheckReqAmtsToAccts) I get a list of all the current acct/amts entries in the table. I also just realized that when I set either link child or link master - the main form doesn't let me make any selections (I'e. I see the drop-down values but when I go to highlight one it doesn't accept it.. no error.. just won't accept). Wait.. this may be the obvious problem.. I don't have this "ID" field anywhere on my subform.. (or my main form for that matter) it is in the subform's table (where I want to info. stored) but nowhere on the subform.. should I create a "ID" textbox and just male the visible propery = false.. because I don't want it shown on the screen. Thanks Steve! - Jenn . |
#18
|
|||
|
|||
I did take your advice on setting the combobox and textbox
control source set to the table account and amounts field. This does make sense to me because this is how I set up the main form screen (and it saves the info. like it should). What does not make sense to me is when you say 'the fact that you see all the records is to be expected'.. I don't understand because this is for the user to select an account (from the drop-down box - values from my accounts table) and for the user to manually enter the amount in (for that account) and then this information get added to my CheckReqAmtsToAccounts table. The txtTotalAmount field is placed in the footer of my subform.. I want this field to sum up the account amounts (as they enter them in). The only fields in my CheckReqAmtsToAccounts table are ID, Amount, Date (this value = CurrentDate), and AcctNumber. I also added the ID field to both forms (main and sub) and for now.. like you said.. I made them visible.. to see what's going on. The main form's ID is good.. it's the next # (auto-number) but the ID field in my sub-form is no good.. I think because of me setting it's control source to my ID field in the table (CheckReqAmtsToAccounts). this value is the value of the first record in that table.. but instead it should match the main form ID (which is a new ID #). The ID field in my CheckRequests table is defined as autoNumber (primary key, no duplicates allowed) and the ID field in the CheckReqAmtstoAccounts field is defined as a number (NOT SET AS primary key, duplicates ok). -----Original Message----- Jenn, You will have to set the Control Source of the combobox and textbox on the subform to the txtAccount and txtAmount fields in the table. The fact that you see all the records is to be expected, and the solution is to get the main/subform link working properly, not to make the controls unbound! What is the story with the txtTotalAmount field? And are there any other fields in the tblCheckReqAmtsToAccts table which are not represented on the subform? It should not be necessary to put a hidden control on the subform bound to the ID field... but not a bad idea to do so, I always do this in such cases just to help make it easier to see what's going on. Plus you can make it visible in the meantime while trying to track down the problem. But it would certainly be a good idea to put the ID field from the main table on the main form. What is the data type of the ID field in the main table? And what is the data type of the ID field in the tblCheckReqAmtsToAccts table? We will get this figured out eventually! -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: Hi Steve.. The subform field names a "txtAccount", "txtAmount", "txtTotalAmount". The settings I have for the subform's Link Master field property is "ID" (when I add "ID" to both the child and master field the subform doesn't look right (within the main form.. when run.. it doesn't even make the combo box and amount fields visible). The subform's record source is set to tblCheckReqAmtsToAccts (table where I want the accts/amounts saved to). The account combobox's rowsource is a select statement (selects account numbers from tblAccounts table) and the txtAmount field is a text field that the user enters in. Both of these fields' control source is set to nothing.. because if I set them to the field name (of the table where I want them stored - tblCheckReqAmtsToAccts) I get a list of all the current acct/amts entries in the table. I also just realized that when I set either link child or link master - the main form doesn't let me make any selections (I'e. I see the drop-down values but when I go to highlight one it doesn't accept it.. no error.. just won't accept). Wait.. this may be the obvious problem.. I don't have this "ID" field anywhere on my subform.. (or my main form for that matter) it is in the subform's table (where I want to info. stored) but nowhere on the subform.. should I create a "ID" textbox and just male the visible propery = false.. because I don't want it shown on the screen. Thanks Steve! - Jenn . |
#19
|
|||
|
|||
Jenn,
Well, what you have described is how it should be, so I still don't understand what the problem is. If you set the Link Child Fields and Link Master Fields properties of the subform to [ID] assuming this is the name of the field in both tables, then the subform should only show those CheckReqAmtsToAccounts records which match the current record on the main form. And any new record added to the subform should automatically have the ID field entered as the ID of the current record on the main form. This is the whole idea of a subform, so if it doesn't work it is very puzzling, but there must be a simple explanation that we are missing at the moment. -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: I did take your advice on setting the combobox and textbox control source set to the table account and amounts field. This does make sense to me because this is how I set up the main form screen (and it saves the info. like it should). What does not make sense to me is when you say 'the fact that you see all the records is to be expected'.. I don't understand because this is for the user to select an account (from the drop-down box - values from my accounts table) and for the user to manually enter the amount in (for that account) and then this information get added to my CheckReqAmtsToAccounts table. The txtTotalAmount field is placed in the footer of my subform.. I want this field to sum up the account amounts (as they enter them in). The only fields in my CheckReqAmtsToAccounts table are ID, Amount, Date (this value = CurrentDate), and AcctNumber. I also added the ID field to both forms (main and sub) and for now.. like you said.. I made them visible.. to see what's going on. The main form's ID is good.. it's the next # (auto-number) but the ID field in my sub-form is no good.. I think because of me setting it's control source to my ID field in the table (CheckReqAmtsToAccounts). this value is the value of the first record in that table.. but instead it should match the main form ID (which is a new ID #). The ID field in my CheckRequests table is defined as autoNumber (primary key, no duplicates allowed) and the ID field in the CheckReqAmtstoAccounts field is defined as a number (NOT SET AS primary key, duplicates ok). Thanks Steve! |
#20
|
|||
|
|||
Thanks Steve.. i guess i was misunderstanding.. the main
form is to enter a new check request.. not look up an existing one.. so the subform will never show records for the check request (bc it is new).. the reason i wanted (and thought was right to do) a subform is for the user to enter the accounts/amounts for that new check request they are entering... then these NEW accounts/amounts (for this NEW checkc request) would be added to my CheckRequestAmntsToAccounts table (and the generated ID field - off the main form is what the subform's ID field would be).. to link the check request with all the accounts/amts that go with it. sorry for the misunderstanding. -----Original Message----- Jenn, Well, what you have described is how it should be, so I still don't understand what the problem is. If you set the Link Child Fields and Link Master Fields properties of the subform to [ID] assuming this is the name of the field in both tables, then the subform should only show those CheckReqAmtsToAccounts records which match the current record on the main form. And any new record added to the subform should automatically have the ID field entered as the ID of the current record on the main form. This is the whole idea of a subform, so if it doesn't work it is very puzzling, but there must be a simple explanation that we are missing at the moment. -- Steve Schapel, Microsoft Access MVP lpjennifer wrote: I did take your advice on setting the combobox and textbox control source set to the table account and amounts field. This does make sense to me because this is how I set up the main form screen (and it saves the info. like it should). What does not make sense to me is when you say 'the fact that you see all the records is to be expected'.. I don't understand because this is for the user to select an account (from the drop-down box - values from my accounts table) and for the user to manually enter the amount in (for that account) and then this information get added to my CheckReqAmtsToAccounts table. The txtTotalAmount field is placed in the footer of my subform.. I want this field to sum up the account amounts (as they enter them in). The only fields in my CheckReqAmtsToAccounts table are ID, Amount, Date (this value = CurrentDate), and AcctNumber. I also added the ID field to both forms (main and sub) and for now.. like you said.. I made them visible.. to see what's going on. The main form's ID is good.. it's the next # (auto-number) but the ID field in my sub-form is no good.. I think because of me setting it's control source to my ID field in the table (CheckReqAmtsToAccounts). this value is the value of the first record in that table.. but instead it should match the main form ID (which is a new ID #). The ID field in my CheckRequests table is defined as autoNumber (primary key, no duplicates allowed) and the ID field in the CheckReqAmtstoAccounts field is defined as a number (NOT SET AS primary key, duplicates ok). Thanks Steve! . |
Thread Tools | |
Display Modes | |
|
|