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
|
|||
|
|||
Actually it is a form processes subscriptions. Once a subscription is
entered and activated most (but not all) fields on that record are to change. Most fields should be locked until the subscription lapses. Each row has a start and end date and if the currecnt date is between those two dates I want to lock those fields FOR THAT ROW ONLY. I really can't create a view only form because even though some fields can not be changed other fields can be cahnged and the form has a complete set of right-click menus that allow other functions to the records. I just want to limit which rows the user can mess with. It is wierd that I can enumerate rows in a listbox but not in a datasheet or continuous forms. do I have ANY options "SusanV" wrote in message ... Oh, jeez I forgot this was a continuous form - not sure how you could accomplish this on a row by row basis. May I ask what your purpose is with this? Wouldn't it be simpler to filter your recordsource to 2 separate datasets - one which would be view-only and one which would open in an editing form? Susan "Charles" wrote in message ... In looking more closely at the solution you suggested it appears to me that when I set me.FirstName.Locked = true That it would set the colume to locked for every row of the form. Is there an event that you had in mind in which to put this code and have it address only a sinbgle row? CL "SusanV" wrote in message ... Best of luck, Susan "Charles" wrote in message ... Thanks again Susan, I understand your solution but do not want to add database fields whose function is to help with input edits. I beleive I will look for a third party datasheet solution Thank you Charles "SusanV" wrote in message ... You could do it this way. Might not be the sleekest but it would work. Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#12
|
|||
|
|||
Hey Charles,
I really think this isn't as difficult as it seemed at first. Playing with a continuous form I have, I found that the following works. The form has 4 fields, MCode, MFreq, MTitle,MEstHrs and LCauseCode. I put the following on the Got Focus event of the field I want to be able to lock, based on whether or not another field, LCauseCode, had been populated with data. On records with NO LCauseCode data, I was unable to edit the MCode, but on the records which have the LCauseCode entered the MCode can be changed. Enter or delete the LCauseCode and then click back to the MCode field and poof, behavior is as required. ''' code Start Private Sub MCode_GotFocus() If IsNull(Me.LCauseCode) Then Me.MCode.Locked = True Else: Me.MCode.Locked = False End If End Sub ''' code end I hope I put all the data back to original LOL - shouldn't play with live data grin I'm sure you could use similar code on the GotFocus event of the fields you would like to be able to lock programmatically. Please let me know if this works for you, Susan "Charles" wrote in message ... Actually it is a form processes subscriptions. Once a subscription is entered and activated most (but not all) fields on that record are to change. Most fields should be locked until the subscription lapses. Each row has a start and end date and if the currecnt date is between those two dates I want to lock those fields FOR THAT ROW ONLY. I really can't create a view only form because even though some fields can not be changed other fields can be cahnged and the form has a complete set of right-click menus that allow other functions to the records. I just want to limit which rows the user can mess with. It is wierd that I can enumerate rows in a listbox but not in a datasheet or continuous forms. do I have ANY options "SusanV" wrote in message ... Oh, jeez I forgot this was a continuous form - not sure how you could accomplish this on a row by row basis. May I ask what your purpose is with this? Wouldn't it be simpler to filter your recordsource to 2 separate datasets - one which would be view-only and one which would open in an editing form? Susan "Charles" wrote in message ... In looking more closely at the solution you suggested it appears to me that when I set me.FirstName.Locked = true That it would set the colume to locked for every row of the form. Is there an event that you had in mind in which to put this code and have it address only a sinbgle row? CL "SusanV" wrote in message ... Best of luck, Susan "Charles" wrote in message ... Thanks again Susan, I understand your solution but do not want to add database fields whose function is to help with input edits. I beleive I will look for a third party datasheet solution Thank you Charles "SusanV" wrote in message ... You could do it this way. Might not be the sleekest but it would work. Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#13
|
|||
|
|||
YES !!!! Susan that will work for me. I am embarassed at how simple the
solution turns out to be. And I can use it with the original datasheet. Thanks so much for your help Man that is simple (blush blush) CL "SusanV" wrote in message ... Hey Charles, I really think this isn't as difficult as it seemed at first. Playing with a continuous form I have, I found that the following works. The form has 4 fields, MCode, MFreq, MTitle,MEstHrs and LCauseCode. I put the following on the Got Focus event of the field I want to be able to lock, based on whether or not another field, LCauseCode, had been populated with data. On records with NO LCauseCode data, I was unable to edit the MCode, but on the records which have the LCauseCode entered the MCode can be changed. Enter or delete the LCauseCode and then click back to the MCode field and poof, behavior is as required. ''' code Start Private Sub MCode_GotFocus() If IsNull(Me.LCauseCode) Then Me.MCode.Locked = True Else: Me.MCode.Locked = False End If End Sub ''' code end I hope I put all the data back to original LOL - shouldn't play with live data grin I'm sure you could use similar code on the GotFocus event of the fields you would like to be able to lock programmatically. Please let me know if this works for you, Susan "Charles" wrote in message ... Actually it is a form processes subscriptions. Once a subscription is entered and activated most (but not all) fields on that record are to change. Most fields should be locked until the subscription lapses. Each row has a start and end date and if the currecnt date is between those two dates I want to lock those fields FOR THAT ROW ONLY. I really can't create a view only form because even though some fields can not be changed other fields can be cahnged and the form has a complete set of right-click menus that allow other functions to the records. I just want to limit which rows the user can mess with. It is wierd that I can enumerate rows in a listbox but not in a datasheet or continuous forms. do I have ANY options "SusanV" wrote in message ... Oh, jeez I forgot this was a continuous form - not sure how you could accomplish this on a row by row basis. May I ask what your purpose is with this? Wouldn't it be simpler to filter your recordsource to 2 separate datasets - one which would be view-only and one which would open in an editing form? Susan "Charles" wrote in message ... In looking more closely at the solution you suggested it appears to me that when I set me.FirstName.Locked = true That it would set the colume to locked for every row of the form. Is there an event that you had in mind in which to put this code and have it address only a sinbgle row? CL "SusanV" wrote in message ... Best of luck, Susan "Charles" wrote in message ... Thanks again Susan, I understand your solution but do not want to add database fields whose function is to help with input edits. I beleive I will look for a third party datasheet solution Thank you Charles "SusanV" wrote in message ... You could do it this way. Might not be the sleekest but it would work. Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#14
|
|||
|
|||
I know the feeling - here I was adding fields! LOL, this is what happens
when we start thinking before the coffee kicks in. grin Glad I could help, Susan "Charles" wrote in message ... YES !!!! Susan that will work for me. I am embarassed at how simple the solution turns out to be. And I can use it with the original datasheet. Thanks so much for your help Man that is simple (blush blush) CL "SusanV" wrote in message ... Hey Charles, I really think this isn't as difficult as it seemed at first. Playing with a continuous form I have, I found that the following works. The form has 4 fields, MCode, MFreq, MTitle,MEstHrs and LCauseCode. I put the following on the Got Focus event of the field I want to be able to lock, based on whether or not another field, LCauseCode, had been populated with data. On records with NO LCauseCode data, I was unable to edit the MCode, but on the records which have the LCauseCode entered the MCode can be changed. Enter or delete the LCauseCode and then click back to the MCode field and poof, behavior is as required. ''' code Start Private Sub MCode_GotFocus() If IsNull(Me.LCauseCode) Then Me.MCode.Locked = True Else: Me.MCode.Locked = False End If End Sub ''' code end I hope I put all the data back to original LOL - shouldn't play with live data grin I'm sure you could use similar code on the GotFocus event of the fields you would like to be able to lock programmatically. Please let me know if this works for you, Susan "Charles" wrote in message ... Actually it is a form processes subscriptions. Once a subscription is entered and activated most (but not all) fields on that record are to change. Most fields should be locked until the subscription lapses. Each row has a start and end date and if the currecnt date is between those two dates I want to lock those fields FOR THAT ROW ONLY. I really can't create a view only form because even though some fields can not be changed other fields can be cahnged and the form has a complete set of right-click menus that allow other functions to the records. I just want to limit which rows the user can mess with. It is wierd that I can enumerate rows in a listbox but not in a datasheet or continuous forms. do I have ANY options "SusanV" wrote in message ... Oh, jeez I forgot this was a continuous form - not sure how you could accomplish this on a row by row basis. May I ask what your purpose is with this? Wouldn't it be simpler to filter your recordsource to 2 separate datasets - one which would be view-only and one which would open in an editing form? Susan "Charles" wrote in message ... In looking more closely at the solution you suggested it appears to me that when I set me.FirstName.Locked = true That it would set the colume to locked for every row of the form. Is there an event that you had in mind in which to put this code and have it address only a sinbgle row? CL "SusanV" wrote in message ... Best of luck, Susan "Charles" wrote in message ... Thanks again Susan, I understand your solution but do not want to add database fields whose function is to help with input edits. I beleive I will look for a third party datasheet solution Thank you Charles "SusanV" wrote in message ... You could do it this way. Might not be the sleekest but it would work. Add a yes/no field to the table. Loop through a recordset of the table, using IF your condition is met, THEN set fldLock = -1, ELSE fldLock = 0. On the form, IF fldLock = -1, THEN me.FirstName.Locked = true me.LastName.locked = true etc etc. Else me.FirstName.Locked = false me.LastName.locked = false etc etc. Endif -- hth, SusanV "Charles" wrote in message ... Gee John, I am not talking about a table. I am talking about rows on a continuous form. How do I advance from one row to the next row. I will test the neccessary criteria as I need to but can I enumerate the continuous forms rows. CL "John Vinson" wrote in message ... On Mon, 3 Oct 2005 14:39:42 -0500, "Charles" wrote: Thank you Susan for your response, However even with a continuous form the question remains... how do I enumerate the rows and lock certain rows (fields on the row) and then move on to the next. How do I enumerate the rows A table HAS NO ORDER. Talking about the first five rows in a table is like talking about the first five potatoes in a wheelbarrow... g You'll need *some* field in the table to indicate which rows are to be protected; in the Form's Current event you can check the value of that field and set the Form's AllowUpdates property appropriately. John W. Vinson[MVP] |
#15
|
|||
|
|||
I certainly have a lot of continues forms where I set the controls 'enabled'
property on/off. While this actually makes all instances of the control go disabled, I actually find this works quite well. I mean, when you move to the next row, those columns that you enable, or disable can then be set. So, you could set the controls visible property as you move the cursor up/down through the In fact, I actually PREFER the above behavior, as then during data entry it is VERY easy to see that the column in question is enabled. In place of a VERY HARD TO READ checkerboard pattern of enabled, and disabled boxes, , you get a very nice enable/display view as I move the cursor up /down. I have uploaded a gif animation of me navigating in a form, both of the two screen shots will give you an idea of how this looks. http://www.members.shaw.ca/AlbertKal...lumn/index.htm -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada http://www.members.shaw.ca/AlbertKallal |
#16
|
|||
|
|||
On Tue, 4 Oct 2005 08:33:27 -0500, "Charles"
wrote: Each row has a start and end date and if the currecnt date is between those two dates I want to lock those fields FOR THAT ROW ONLY. In that case you can use the form's Current event; it fires whenever the user moves to a different row. You can set the Form's AllowEdits property, or the Enabled property of one or any number of controls, in this event; when you move to a different row, you can then reset these properties to the value appropriate for that row. John W. Vinson[MVP] |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The "Right" web hosting for data access pages?? | Ron Ehrlich | General Discussion | 9 | May 6th, 2005 05:49 AM |
Why is a French Spellchecker a "required" update for English speak | French Spellcheck Required? | General Discussion | 23 | April 26th, 2005 01:17 AM |
Encrypt AccesS File? | milest | General Discussion | 2 | February 9th, 2005 07:58 PM |
Images in a database | Franz | General Discussion | 10 | October 7th, 2004 09:35 AM |
Adding staff photographs to my database | KK | New Users | 2 | September 3rd, 2004 07:41 AM |