Thanks AceMan1.
I made an error in my second last post.
I meant to say that I put "=UpdateThis()" in the BeforeUpdate line on the property sheet for each field that should be involved in the calculation and "0" in the Tag property for each field that is not. This works beautifully (I think)...
...for each control. So I can add that when I create the control with VBA.
-----------------------------------------
Where would we be if we didn't try?
I have to join you with "I am not sure I am completely following [you]..."
What is a related charges table etc? (Question 4)
What I am building is a database for single user environment, but will be distributed to several users, individually. There are several fields that are mandatory for all...
Thanks lameid.
Thanks for the NZ(). I agree.
What I had done is try the calc in AfterUpdate, and did not work. I saw a thread where it worked in BeforeUpdate, so I used it and since my loop reads ctl.value, it gets any new values you type in before you actually navigate to the next record.
I...
I have a subform in datasheet view for entering species count data; one record for species with several fields for different count techniques and times. There are two fields to hold the total count across columns for each record, one locked field for the calculated total for the row, the other...
Ahhhh!
Not totally working. You have to go to a new record to see the updated calculation. How can I get it to update when focus changes to another field within the same record???
-----------------------------------------
Where would we be if we didn't try?
found another thread that clued me in to using Form_BeforeUpdate. It works now.
-----------------------------------------
Where would we be if we didn't try?
Thanks Knicks.
Because of a thypo in your reply, I am not sure what you are recommending.
I hear the term "calculated field" at times, but I am not sure precisely what it means; whether a field with some sort of formula associated with it, or just a field that holds the result of some...
I tried this and it worked once, but seems to be in an endless loop which lets me navigate from field to field in the same record, but otherwise freezes me out.
Private Sub Form_AfterUpdate()
If Screen.ActiveControl.Name <> "txtTtl" Then Call UpdateMyTotal
End Sub
Private Sub...
I have a subform in datasheet view. When entering a value in any of several "SurveyCount" textboxes, I need to update the sum of all those textboxes in another "CalculatedTotal" textbox within that record. How on earth is this done???
Note: Because users can add custom fields, I don't know at...
Thanks AceMan.
The form is in design mode, so I tried switching to preview mode with no joy. Below is the proc that opens the form, tries to save it and then closes it.
Private Sub ConfigSite()
Dim iStnID As Integer
Dim sFrm As String
Dim iSiteGrouping As Integer...
Hey John.
I just packaged it and opened it on my dev machine and I am able to change the forms, programmatically. Is it bypassing the run-time and running off access, or will this also work on a machine that does not have access installed???
-----------------------------------------
Where...
Wow. Thanks.
I was planning to package it and send with the runtime. I will have to rework this.
By reading my misplaced post, which is linked to, above, you will see that I used the docmd. statement you prescribed. It isn't working.
-----------------------------------------
Where would we...
I posted this question in the wrong forum here. So here is the gist...
when programmatically closing a form on which I just programmatically added controls to its subform, I am prompted to save. How can I skip the prompt and save, ...programmatically of course...
Right. So would you use the base query with no filters, as set in the properties dialog, and just specify a different filter for each instance in the loop?
...
.Form.Filter = "([Q_T_Bird_Data_Entry_Tabs].[Site_ID]= " & iSite & ")"
...
This worked for the first iteration through...
I programmatically create a Tab Control with a few tabs. Each tab contains a different instance (I believe) of the same subform. I want each instance to have a diffent RecordSource, but they all seem to end up with the same recordsource. Not sure where to look.
Public Function...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.