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 |
#1
|
|||
|
|||
VBA - GET / SET ??
Hello, I'm not sure that subject line is exactly right for this but in my
head it sounded close. I have a form with 4 columns of data (ID, Lbound, Ubound, and Description). There are 11 rows of data that a user can modify, and because Lbound in every row needs to be the same as Ubound of the previous row I would like to GET the value of Ubound for each row and SET the value of Lbound. So the user only needs to enter or modify the value for Ubound and the description. Is GET and SET the right functions to use or am I getting VBA mixed up with VB? And can someone start me in the right direction to accomplish this? Thanks for your help in advance. I truly appreciate all your help and still hope to be able to help others one of these days. |
#2
|
|||
|
|||
VBA - GET / SET ??
You really don't need the 'LBound' field if it is the value from the previous
record. What you would need is a 'Ranked' query to pull the value. http://blogs.conchango.com/jamespipe...n-a-query.aspx -- ~Your Friend Chris http://myvbastuff.blogspot.com/ thinking out loud "MVP - WannaB" wrote: Hello, I'm not sure that subject line is exactly right for this but in my head it sounded close. I have a form with 4 columns of data (ID, Lbound, Ubound, and Description). There are 11 rows of data that a user can modify, and because Lbound in every row needs to be the same as Ubound of the previous row I would like to GET the value of Ubound for each row and SET the value of Lbound. So the user only needs to enter or modify the value for Ubound and the description. Is GET and SET the right functions to use or am I getting VBA mixed up with VB? And can someone start me in the right direction to accomplish this? Thanks for your help in advance. I truly appreciate all your help and still hope to be able to help others one of these days. |
#3
|
|||
|
|||
VBA - GET / SET ??
Are you intentionally trying to insult MVPs? You've succeeded. "MVP WannaB"
as a display name says to everybody "My skills are at MVP level, so please evaluate me for the award". Your post implies MVPs are clueless and don't know what get and set are for, don't know they shouldn't use reserved words for column names, and don't know that sorting data in a certain order requires an order by clause in the query. Chris Microsoft MVP MVP - WannaB wrote: Hello, I'm not sure that subject line is exactly right for this but in my head it sounded close. I have a form with 4 columns of data (ID, Lbound, Ubound, and Description). There are 11 rows of data that a user can modify, and because Lbound in every row needs to be the same as Ubound of the previous row I would like to GET the value of Ubound for each row and SET the value of Lbound. So the user only needs to enter or modify the value for Ubound and the description. Is GET and SET the right functions to use or am I getting VBA mixed up with VB? And can someone start me in the right direction to accomplish this? Thanks for your help in advance. I truly appreciate all your help and still hope to be able to help others one of these days. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200810/1 |
#4
|
|||
|
|||
VBA - GET / SET ??
"MVP - WannaB" wrote in message
... Hello, I'm not sure that subject line is exactly right for this but in my head it sounded close. I have a form with 4 columns of data (ID, Lbound, Ubound, and Description). There are 11 rows of data that a user can modify, and because Lbound in every row needs to be the same as Ubound of the previous row I would like to GET the value of Ubound for each row and SET the value of Lbound. So the user only needs to enter or modify the value for Ubound and the description. Is GET and SET the right functions to use or am I getting VBA mixed up with VB? And can someone start me in the right direction to accomplish this? Thanks for your help in advance. I truly appreciate all your help and still hope to be able to help others one of these days. In VBA GET and SET relate to properties of class objects --- different subject altogether. (In the VBA editor, type class module into the help search and have fun reading! Some developers write class modules, others don't, from what I hear.) Are the Lbound and Ubound values required? Can the user 'jump around' in the 11 rows? That is, can you guarantee that the user will always progress sequentially through the rows? In my experience that's generally a bad assumption. Assuming an initial data entry environment where the user always proceeds sequentially 'down' the form something along these lines: In the form (or Ubound control) AfterUpdate event set the default value for Lbound [assuming that the next row hasn't been added to the table yet.] ctlLbound.DefaultValue = ctlUbound.Value (DefultValue is always a string --- in some situations you need to handle the data type conversion yourself.) If the 11 rows are already present in the table the default value won't help you. In this situation you can use the form's Current event to set the Lbound value. I have also used the form's Before Insert event instead of the current event so that I only modify a control's value if the user begins typing a value into any control; the Current event will fire anytime the current record pointer changes for any reason. HTH -- Clif Still learning Access 2003 |
#5
|
|||
|
|||
VBA - GET / SET ??
"vbasean" wrote in message
... You really don't need the 'LBound' field if it is the value from the previous record. What you would need is a 'Ranked' query to pull the value. Chris, what is the value of Lbound in the first row? [Or, where does the initial value come from?] Doesn't that tend to require storing the value? http://blogs.conchango.com/jamespipe...n-a-query.aspx Thanks for that link --- I'm keeping that one! remainder snipped -- Clif Still learning Access 2003 |
#6
|
|||
|
|||
VBA - GET / SET ??
"Chris O'C via AccessMonster.com" u29189@uwe wrote in message
news:8c586103c8cc2@uwe... Are you intentionally trying to insult MVPs? You've succeeded. "MVP WannaB" as a display name says to everybody "My skills are at MVP level, so please evaluate me for the award". Your post implies MVPs are clueless and don't know what get and set are for, don't know they shouldn't use reserved words for column names, and don't know that sorting data in a certain order requires an order by clause in the query. Chris, I disagree. I've never interpreted WannaB's display name that way; rather as a future goal that is being worked toward. -- Clif Still learning Access 2003 |
#7
|
|||
|
|||
VBA - GET / SET ??
Chris,
I know you worked hard for your MVP and rightly so but have you concidered that his handle implies that he 'aspires' to be an MVP one day. Which would be flattery instead of insult... -- ~Your Friend Chris http://myvbastuff.blogspot.com/ thinking out loud "Chris O'C via AccessMonster.com" wrote: Are you intentionally trying to insult MVPs? You've succeeded. "MVP WannaB" as a display name says to everybody "My skills are at MVP level, so please evaluate me for the award". Your post implies MVPs are clueless and don't know what get and set are for, don't know they shouldn't use reserved words for column names, and don't know that sorting data in a certain order requires an order by clause in the query. Chris Microsoft MVP MVP - WannaB wrote: Hello, I'm not sure that subject line is exactly right for this but in my head it sounded close. I have a form with 4 columns of data (ID, Lbound, Ubound, and Description). There are 11 rows of data that a user can modify, and because Lbound in every row needs to be the same as Ubound of the previous row I would like to GET the value of Ubound for each row and SET the value of Lbound. So the user only needs to enter or modify the value for Ubound and the description. Is GET and SET the right functions to use or am I getting VBA mixed up with VB? And can someone start me in the right direction to accomplish this? Thanks for your help in advance. I truly appreciate all your help and still hope to be able to help others one of these days. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200810/1 |
#8
|
|||
|
|||
VBA - GET / SET ??
I don't mind aspirations. If they aspire to be an MVP they can put it in the
text of the post. The display name is a big neon sign that says "Look at me!" They're drawing attention to themselves to make sure they're not missed for an MVP award evaluation when they put MVP in the display name on posts. You think it's coincidence so many MVPs put MVP in their display names when they post? It's so they can be identified easily with the neon sign. Chris Microsoft MVP vbasean wrote: I know you worked hard for your MVP and rightly so but have you concidered that his handle implies that he 'aspires' to be an MVP one day. Which would be flattery instead of insult... -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200810/1 |
#9
|
|||
|
|||
VBA - GET / SET ??
OH Chris, I regret that you misunderstand me, and I mean no offense. My
display name actually tells everyone that I wish I were bright enough to be an MVP and that I admire and respect all MVPs such that I strive to be as good as they already are. While I am hurt that you misunderstand my intent, I do understand that everyone has there own interpretation of what they read. I will consider a display name that show the admiration that I truly have for all MVP's who have achieved such a level of accomplishment. As for your thought that "my post implies MVPs are clueless" That is the last thing that I intend to imply and I would not waste my time to post such rubble. ========================== "Chris O'C via AccessMonster.com" wrote: Are you intentionally trying to insult MVPs? You've succeeded. "MVP WannaB" as a display name says to everybody "My skills are at MVP level, so please evaluate me for the award". Your post implies MVPs are clueless and don't know what get and set are for, don't know they shouldn't use reserved words for column names, and don't know that sorting data in a certain order requires an order by clause in the query. Chris Microsoft MVP MVP - WannaB wrote: Hello, I'm not sure that subject line is exactly right for this but in my head it sounded close. I have a form with 4 columns of data (ID, Lbound, Ubound, and Description). There are 11 rows of data that a user can modify, and because Lbound in every row needs to be the same as Ubound of the previous row I would like to GET the value of Ubound for each row and SET the value of Lbound. So the user only needs to enter or modify the value for Ubound and the description. Is GET and SET the right functions to use or am I getting VBA mixed up with VB? And can someone start me in the right direction to accomplish this? Thanks for your help in advance. I truly appreciate all your help and still hope to be able to help others one of these days. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200810/1 |
#10
|
|||
|
|||
VBA - GET / SET ??
People who evaluate MVPs look for the MVP in the display name. You're not
evaluating MVPs so it doesn't have the same significance to you. It's like if you're an American reading an online article, dollar signs will catch your eye as currency, but yen signs probably won't. Yen doesn't mean anything to you - but for those who can spend it, it means a lot. Chris Microsoft MVP Clif McIrvin wrote: Chris, I disagree. I've never interpreted WannaB's display name that way; rather as a future goal that is being worked toward. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200810/1 |
Thread Tools | |
Display Modes | |
|
|