I am trying to sum based on multiple criteria.
I want to be able to have a calculated sum in one field that can automatically calculate the dollar amount of all records in a transaction that the ysnSP field = "YES".
So I created a field in my report and added this below. However it did not...
Sorry that I was not more detailed in my first post. I am really a newbie to vb and am trying my best to learn. I try to use snippets of what has worked in the past and incorporate that into what I am doing. The Before Update is what I used in past and it worked.
I don't have a clear...
I have even tried this and it is not working
Private Sub fkSetID_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.fkSetID.Value) Then
Forms![mfrmSets]![pkSetID].DefaultValue = """" & Me.fkSetID.Value & """"
End If
End Sub
Yes I am updating the control of fkSetID. So basically I have a form that has set and a subform that has cards that belong to the set. I click on a card number and it opens the form in question in which the first field is fkSetID. I have a Save & New button (cmdSaveandNew)that I click on and...
I have used this code before to populate a new record with a previous records value. This time it is not working. The only difference is the previous time it was on a continuous form and this on is a single form. Can someone point me in the right direction. Thanks again -Pat
Private Sub...
Skip thanks for the help. That made me think a bit different and this is what I came up with. It seems to work Do you see any problems if it.
strSQL = "Update tblCards set intTradeQty=intTradeQty+" & Nz(Me.intTradeUpdate, 0) & " where pkCardID= '" & Me.pkCardID & "'"
DoCmd.SetWarnings False...
I am trying to provided an error check compent to my form where it checks to see if a value in the intWantQty is greater than 1 if so it would prompt the user of a possible error. However when I test the code below it prompts for and value enter even if the intWantQty is 0. Any ideas?
Thanks...
Thanks.
Ok that appears to have gone the trick. Now the only problem I am having is that when I enter a value it shows up for very record in the datasheet but it does only update current records. For example if I am on pkeyCardID 422 and I enter 1 it populates all records in the datasheet...
So this what I have now and I am still getting the same results. Confused.
DoCmd.RunSQL "Update tblCards set intCardWantQOH=intCardWantQOH-" & Nz(hold_WLqty, 0) & " where pkeyCardID=" ' " & Me.pkeyCardID & " ' "
DoCmd.RunSQL "Update tblCards set intCardWantQOH=intCardHaveQOH+" &...
I am using the code below to update fields values based on the after update entry in a field. However when I try to run it it wants to update all records in the table and not just the specific CardID. Any ideas on what I am doing wrong?
DoCmd.RunSQL "Update tblCards set...
On my order page I would like to have a button to remove and item which is record on the a continous form. I am trying to to use the following code but am getting this error:
Code:
DoCmd.RunSQL "Update tblTICards set intTICardQQH=intTICardQQH+" & Nz(hold_TIqty, 0) & " where pkTICardID="""...
I have a piece of vba code (from Blueclaw) that I use for inventory control. I have used successfully it in the past on a prototype database that I created and all worked fine. Now I am getting an error listed below. The only difference is the that pkTICardID was a number and in the new...
I am attempting to output a report to HTML. The problem I am having is that Access wants to force the output to multiple HTML files and I need it to be outputted to a single page HTML. I have searched and have not found many solutions to the issue, but I did find a piece of code that may help...
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.