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
|
|||
|
|||
fOSUserName revisited
Referencing http://www.mvps.org/access/api/api0008.htm he
I realize this is old stuff and I've run searches til I'm blue in the face but, I'm hoping *someone* can help me out with this. I finally got this code to work in a form I'm using. HOWEVER, the form has a subform that needs to have the data "stamped" into it each and every time. How do I get the information from the form =fOSUserName () into the subform table automatically? Putting in the field's default value bombs because ya can't enter a custom function in that area. I can get it onto my base form easily enough with a text box. How to get that data into the table in the subform is where I'm going nutz! Help me, Obi Wan Kenobee! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200512/1 |
#2
|
|||
|
|||
fOSUserName revisited
While you can't set the field's Default Value to that function in the table,
you can in the form's textbox. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Gary T via AccessMonster.com" u2143@uwe wrote in message news:587b803d530a0@uwe... Referencing http://www.mvps.org/access/api/api0008.htm he I realize this is old stuff and I've run searches til I'm blue in the face but, I'm hoping *someone* can help me out with this. I finally got this code to work in a form I'm using. HOWEVER, the form has a subform that needs to have the data "stamped" into it each and every time. How do I get the information from the form =fOSUserName () into the subform table automatically? Putting in the field's default value bombs because ya can't enter a custom function in that area. I can get it onto my base form easily enough with a text box. How to get that data into the table in the subform is where I'm going nutz! Help me, Obi Wan Kenobee! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200512/1 |
#3
|
|||
|
|||
fOSUserName revisited
My "AddedBy", "AddedOn", "ChangedBy", "ChangedOn" fields generally don't
appear on forms (and if they do, they are disabled). In either case, I don't worry about what the controls display while editing is going on. I just call a generic routine in the form's BeforeUpdate event to update the underlying field values with the current user, current time, etc at the time of the Update. HTH -- George Nicholson Remove 'Junk' from return address. "Gary T via AccessMonster.com" u2143@uwe wrote in message news:587b803d530a0@uwe... Referencing http://www.mvps.org/access/api/api0008.htm he I realize this is old stuff and I've run searches til I'm blue in the face but, I'm hoping *someone* can help me out with this. I finally got this code to work in a form I'm using. HOWEVER, the form has a subform that needs to have the data "stamped" into it each and every time. How do I get the information from the form =fOSUserName () into the subform table automatically? Putting in the field's default value bombs because ya can't enter a custom function in that area. I can get it onto my base form easily enough with a text box. How to get that data into the table in the subform is where I'm going nutz! Help me, Obi Wan Kenobee! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200512/1 |
#4
|
|||
|
|||
fOSUserName revisited
George Nicholson wrote:
My "AddedBy", "AddedOn", "ChangedBy", "ChangedOn" fields generally don't appear on forms (and if they do, they are disabled). In either case, I don't worry about what the controls display while editing is going on. I just call a generic routine in the form's BeforeUpdate event to update the underlying field values with the current user, current time, etc at the time of the Update. That's all well & good however, tables as a subform do not have BeforeUpdate. They have something like OnEnter and OnExit. So far, I've been toying with an append or update query. I'm SOOOOOO close! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200512/1 |
#5
|
|||
|
|||
fOSUserName revisited
"Gary T via AccessMonster.com" u2143@uwe wrote in message
news:587d23e6a2d8c@uwe... George Nicholson wrote: My "AddedBy", "AddedOn", "ChangedBy", "ChangedOn" fields generally don't appear on forms (and if they do, they are disabled). In either case, I don't worry about what the controls display while editing is going on. I just call a generic routine in the form's BeforeUpdate event to update the underlying field values with the current user, current time, etc at the time of the Update. That's all well & good however, tables as a subform do not have BeforeUpdate. They have something like OnEnter and OnExit. So far, I've been toying with an append or update query. I'm SOOOOOO close! What you're talking about is the subform control on the main form that "hosts" the actual subform. Whatever you're using as a subform is a form in its own right, though: put the logic in its BeforeUpdate event. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) |
#6
|
|||
|
|||
fOSUserName revisited
...tables as a subform...
I have absolutely *no* idea what that means. You can't use a table in a subform control, you have to use a form (or report). Even if you select Table or Query when using the subform control wizard, Access will create a new form based on that table/query and use that form as the SourceObject for the subform control. The same thing happens if you try to "drop" a table or query onto a form: Access creates a new form based on that table/query and uses that new form as the SourceObject. (At least that's what happens when I try it in Access XP/2002). So, given that a subform control *requires* a form (or nothing) as a SourceObject, that form has a BeforeUpdate event that will fire when changes are made to data on the subform. HTH, -- George Nicholson Remove 'Junk' from return address. "Gary T via AccessMonster.com" u2143@uwe wrote in message news:587d23e6a2d8c@uwe... George Nicholson wrote: My "AddedBy", "AddedOn", "ChangedBy", "ChangedOn" fields generally don't appear on forms (and if they do, they are disabled). In either case, I don't worry about what the controls display while editing is going on. I just call a generic routine in the form's BeforeUpdate event to update the underlying field values with the current user, current time, etc at the time of the Update. That's all well & good however, tables as a subform do not have BeforeUpdate. They have something like OnEnter and OnExit. So far, I've been toying with an append or update query. I'm SOOOOOO close! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200512/1 |
#7
|
|||
|
|||
fOSUserName revisited
Douglas J Steele wrote:
My "AddedBy", "AddedOn", "ChangedBy", "ChangedOn" fields generally don't appear on forms (and if they do, they are disabled). In either case, I don't [quoted text clipped - 6 lines] They have something like OnEnter and OnExit. So far, I've been toying with an append or update query. I'm SOOOOOO close! What you're talking about is the subform control on the main form that "hosts" the actual subform. Whatever you're using as a subform is a form in its own right, though: put the logic in its BeforeUpdate event. That's odd. On my form, it's showing as a TABLE.... not a subform control. Therefore, no BeforeUpdate event. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200512/1 |
#8
|
|||
|
|||
fOSUserName revisited
George Nicholson wrote:
...tables as a subform... I have absolutely *no* idea what that means. You can't use a table in a subform control, you have to use a form (or report). Even if you select Table or Query when using the subform control wizard, Access will create a new form based on that table/query and use that form as the SourceObject for the subform control. The same thing happens if you try to "drop" a table or query onto a form: Access creates a new form based on that table/query and uses that new form as the SourceObject. (At least that's what happens when I try it in Access XP/2002). So, given that a subform control *requires* a form (or nothing) as a SourceObject, that form has a BeforeUpdate event that will fire when changes are made to data on the subform. Honest... I wouldn't lie to ya... The source object in properties shows it as "TABLE.tablename". The only two events are "On Enter" and "On Exit". Am I missing something? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200512/1 |
#9
|
|||
|
|||
fOSUserName revisited
Gary T wrote:
...tables as a subform... [quoted text clipped - 10 lines] SourceObject, that form has a BeforeUpdate event that will fire when changes are made to data on the subform. Honest... I wouldn't lie to ya... The source object in properties shows it as "TABLE.tablename". The only two events are "On Enter" and "On Exit". Am I missing something? I just caught it... I have a TABLE on the form NOT a SUB-FORM. Sheesh! I got the results I wanted using macros. Kind of a kludge but, hey.... it works. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200512/1 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Date field revisited | Keith Meier, MCSA | Using Forms | 4 | June 15th, 2005 03:04 PM |
Problems emailing an HTML form revisited | ubmatrix | Outlook Express | 11 | June 7th, 2005 10:18 PM |
Error 429 Revisited | Bob Barnes | General Discussion | 2 | May 30th, 2005 02:10 AM |
How to run a macro based on cell value - Revisited | Haleigh | Worksheet Functions | 3 | August 31st, 2004 11:23 AM |
Development Environment REVISITED | Bob Dobalina | General Discussion | 8 | August 27th, 2004 05:48 AM |