Search results

  1. C

    Access can't find the 'FrmLookup' referred to in your expression in a form

    Hello all, I keeping a the error (Access can't find the 'FrmSearch' referred to in your expression in a form) Can anyone point me in the right direction. Here is my code: Private Sub Search_Click() Const cInvalidDateError As String = "You have entered an invalid date." Dim strWhere As...
  2. C

    Pivot Tables keep ungrouping when I Refresh

    Hello, I am using Excel 2007 and I have about 20 pivot tables on my sheet. I am using a Microsoft Query to get me the data I need form a Access Database. But, everytime I refresh the date groups I set up ungroup and some of the data I select in the dropdowns reset. Is there a way for me to...
  3. C

    Using SQL with RecordSet

    Thanks for the help Wayne. I have been working on this Sql Statement to see if what i am processing is correct. I keep getting errors. Here is the code i have been playing with to see my SQL results. Private Sub Text114_Click() Dim strSQL As String strSQL = "SELECT [Prod Specialist #]...
  4. C

    Using SQL with RecordSet

    I keep getting the run-time error 3709 when I run this code. Can someone help me figure out what I am doing wrong. Private Sub Text114_Click() Dim ar As adodb.Recordset Set ar = New adodb.Recordset ar.Open "SELECT Count(1) AS Total, tbl_referral.[Prod Specialist #]" & _...
  5. C

    Having problems with Dlookup

    Thanks for the help, I have been working on converting my dlookups to SQL, but I am new to using record sets. Here is some of my SQL. Will you point me in the right direction in converting this to VBA and using record sets. SELECT Count(1) AS Total, tbl_referral.[Prod Specialist #] FROM...
  6. C

    Having problems with Dlookup

    I am working a school project which is a simple split database with form that performs many calculations. Currently, I am using Dlookups but it is very slow in processing, is there a quicker way to perform these calculations or a better approach at stream line my code. Here is my code...
  7. C

    I keep getting 2501 error

    Works like a charm. thanks for the link and the help
  8. C

    I keep getting 2501 error

    Hello all, I am trying to build a simple search form which will allow a user to enter a product id, perform the search and then and open another form with product details but every time i try to run it i get the 2501 error and it does not open the form. The Product ID is 9-15 digits long...
  9. C

    Pivot Table automation question

    I have a question I have a pivot table which has you can drill down by month in it. What I would like to do is click a button and make it select the next month with me selecting it. Example the pivot table is show May's Data I click a button and the the pivot table selects June. Is that...
  10. C

    DSUM VBA Code Help

    Thanks for the help
  11. C

    DSUM VBA Code Help

    Its about 8000 records. Do I build the query in VBA and then have the Dlookup from that?
  12. C

    DSUM VBA Code Help

    Hello all, I need some help with my code. I have this code on the after update in a text box called Text0. What I am trying to do is have the user type in their ID number and the code will run summing up certain fields and display them in other text boxes in on the form. The problems I am...
  13. C

    Updating with VBA

    Hello all, I have a simple table called tblProductCode, with three fields Product, Payout and Value. What I am trying to do is write a simple If statement that will check to see if the cbo box Approved has the word “approved” in it and also compare the value in txt Gear with the Product field...
  14. C

    Form automation

    I found a simple way to make some of my fields required. Here is the code I used, it works but is there a way to make it more proper? Private Sub Form_BeforeUpdate(Cancel As Integer) If Len(Me.Refer & vbNullString) = 0 Then MsgBox "Please fill out REFERRAL SPECIALIST Field" Cancel = True...
  15. C

    Form automation

    Hello all, I have a few questions. I built a form and I want to upgrade it. I want to make certain fields required before a user can save. Also I want to automate a process I currently have. The user makes a selection in a cbo box which has 2 options (approved or denied). I have an update...
  16. C

    Dcount in a Form

    I figured out what I was doing wrong, I pasted the code incorrectly. Here is what worked for me =DCount("[APPROVED]"," tbl_sales ","[Seller]=" & Forms!QuickStats!txtSeller & " And [APPROVED]='Approved' And [DATE REFERRED] Between #" & DateSerial(Year(Date()),Month(Date()),1) & "# And #" &...
  17. C

    Dcount in a Form

    Thanks for helping me out. I have been trying to implement this and I am getting a #error. I don’t know what I am doing wrong
  18. C

    Dcount in a Form

    Sorry I am new to using the Dcount funcation, is this what you mean? Code: =DCount("[APPROVED]","tbl_sales","Seller =" & Forms!QuickStats!txtSeller And [APPROVED]='Approved' And [DATE REFERRED] Between DateSerial(Year(Date()),Month(Date()),1) And Now())
  19. C

    Dcount in a Form

    I have a form called Totals which has 2 text boxes. One you enter a ID number. The textbox is called txtPS. The other has my Dcount code. Called txttotals. Code: =DCount("[APPROVED]","tbl_sales","Seller =" & Forms!QuickStats!txtSeller And [APPROVED]="Approved" And [DATE REFERRED] Between...
  20. C

    Cascading Combo Box Question

    I have a problem. I built a simple Cascading Combo Box, which is not picking up my forms statement correctly. Can anyone see what I am doing wrong? Here is my Row Source code for the Combo Box: SELECT DISTINCTROW Table1.zip FROM Table1 WHERE (((Table1.city) Like...
Back
Top Bottom