Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. rccline

    Highlighting Duplicates with Conditional Formatting

    (1) I do not remember how the ) got there. I do remember removing it from the form. I did not remove it from the subform. (2) I deleted the old subform and created a new subform with the control named BkPg. (3) The backcolor from the Conditional Expression is working. (4) Debug.Print...
  2. rccline

    Highlighting Duplicates with Conditional Formatting

    I do not know how to create a query to show all names on the controls on the form. I can click through the form in layout mode and look at the control names. There is a subform on the form that references the control BkPg within the same query as the form. Name BOOK-PAGE-2012) Label Name...
  3. rccline

    Highlighting Duplicates with Conditional Formatting

    I created the sub by creating a Before Update Event Procedure on the form. Private Sub BOOK_PAGE_2012__BeforeUpdate(Cancel As Integer) Dim sBkPg As String Debug.Print Me.[BkPg].Value 'check the value since it might not be set Let sBkPg = DLookup("[BkPg]", "qry_copyrequest", "[BkPg] = '" &...
  4. rccline

    Highlighting Duplicates with Conditional Formatting

    I added Option Explicit and removed Option Compare Database. I ran Debug.Print Me.[BkPg].Value in the immediate window. I am still getting the Compile Error "Variable not yet created in this context." Is it wrong to have a control named BkPg ? The Conditional Formatting Expression did not work...
  5. rccline

    Highlighting Duplicates with Conditional Formatting

    Debug.Print Me.[BkPg].Value 'check the value since it might not be set Compile error: Variable not yet created in this context.
  6. rccline

    Highlighting Duplicates with Conditional Formatting

    What a great idea. I cannot step through the code. Private Sub BOOK_PAGE_2012__BeforeUpdate(Cancel As Integer) Dim sBkPg As String Debug.Print Me.[BkPg].Value 'check the value since it might not be set Let sBkPg = DLookup("[BkPg]", "qry_copyrequest", "[BkPg] = '" & Me.BkPg & "'") MsgBox...
  7. rccline

    Highlighting Duplicates with Conditional Formatting

    Andrzejek asked "What is the Let?" I have no idea. It was contained in the code posted on Stackoverflow by "Rick." I was thinking, "it works!" But, the VBA code does not have any method described to change the color. What changed was renaming the control source.
  8. rccline

    Highlighting Duplicates with Conditional Formatting

    I tried DLookup code I found on Stackoverflow. I modified it to fit my ACCDB. Option Compare Database Private Sub BOOK_PAGE_2012__BeforeUpdate(Cancel As Integer) Dim sBkPg As String Let sBkPg = DLookup("[BkPg]", "qry_copyrequest", "[BkPg] = '" & Me.BkPg & "'") MsgBox "This Book & Page already...
  9. rccline

    Highlighting Duplicates with Conditional Formatting

    Duane: Wow! Thank you for going to such extremes. As for the background: I had set the background to Red and Text to Bold:White. Now, I have renamed the fields. BOOK-PAGE-2012 is now BkPg. Still, no formatting when duplicates exist. I have tried the following code which did not work...
  10. rccline

    Highlighting Duplicates with Conditional Formatting

    Duane: Again, thank you for trying to help with this issue. I checked the data which was input, wondering if special characters (i.e. the "-") made a difference. It did not. After entering a value without special characters, the expression is still not evaluating for a duplicate. I...
  11. rccline

    Highlighting Duplicates with Conditional Formatting

    I am getting no error. I set the ID to turn red if n>1. And, the background should turn red if the record BOOK-PAGE-2012 is a duplicate. I checked the record and there are no spaces in 71-151 in either the new record or the original record.
  12. rccline

    Highlighting Duplicates with Conditional Formatting

    Formatting for a value works.
  13. rccline

    Highlighting Duplicates with Conditional Formatting

    Duane: Thank you very much. This code is not working for me. I have copied the code into the expression exactly. I applied the same formatting structure on the field RequestID which is a Number, Double. That doesn't work either. qry_copyrequest: SELECT tbl_copyrequest.ID...
  14. rccline

    Highlighting Duplicates with Conditional Formatting

    I have an MS Access form that is based on a query. I want to apply conditional formatting to highlight the field on the form if the data is already in the dataset. the query name is qry_copyrequest. the table name is tbl_copyrequest the field with the duplicates is BOOK-PAGE-2012 the...
  15. rccline

    Running R script from Access module

    The error occurs on Debut.Print Dir(path) Error 52: Bad file name or number
  16. rccline

    Running R script from Access module

    I created a form with a command button to run on click: I am getting an error: Private Sub Command5_LostFocus() ' Sub RunRscript() Dim shell As Object Dim path As String Dim waitTillComplete As Boolean: waitTillComplete = True Dim style As Integer: style = 1 Dim...
  17. rccline

    Running R script from Access module

    I would like to run an R script I have named "iterate.R" from an MS Access module via a command button on a form. I found the following code on StackOverflow, but something is wrong when I substitute my path. Link Sub RunRscript() Dim shell As Object Dim path As String Dim...
  18. rccline

    How to write the Dsum "WhereCondition" on Subform

    Thank you very much Duane! That worked like a charm. Robert
  19. rccline

    How to write the Dsum "WhereCondition" on Subform

    I would like to show the total of my subform on the main form. I have tried to create a textbox on my subform using =Sum([WI]) I have seen and read examples, but in my case, this formula only returns the message: #error I tried to use Dsum that I read in thread702-1778486. The...
  20. rccline

    How do you refresh the conditional formatting of a textbox on a form when related field is changed?

    Andrzejek: I do realize I could have edited or deleted my post. I was thinking that what I discovered might have helped someone else who had the same question. Robert

Part and Inventory Search

Back
Top