Search results

  1. J

    Access VBA not changing Word Font.Color

    Several times! ;) The Word macro shown gets Source_Text and Replacement_Text as hard-coded values in the macro. (I've changed them both to be entered from InputBox calls.) So it doesn't need the values to be passed.
  2. J

    Programming with VBA and Macro

    I use both macros (for simple things, like closing the current form, or for things that are hard to do in VBA, like exporting to EXCEL) and VBA (for the myriad of things that can't be done in macros) in my database. I even have macros that execute code! @Pat Hartman is correct that nthere's no...
  3. J

    Access VBA not changing Word Font.Color

    I have "hard-coded" text in my word document, such as Estimated and Actual Project Costs and the difference between them. My document might have something like "Your Actual Project Cost of [ActProjCost] is [more/less] than your Estimated Project Cost of [EstProjCost] by [Act-Minus-Est]." All...
  4. J

    Access VBA not changing Word Font.Color

    Sorry. I meant why the code didn't change the font color. I replaced If IsNumeric(Replacement_Text) Then If Replacement_Text < 0 Then .Replacement.Font.Color = wdColorRed End If End If with If IsNumeric(Replacement_Text) Then If Replacement_Text < 0 Then...
  5. J

    Can't edit fields in form that uses calculated controls

    If you want a calculated field that you can edit, leave it unbound and in the appropriate events (after update for the fields used to calculate, and on Open for the form) add Me.[calculated_field] = [expression]. Having this field be editable is bad design, because then it's uncertain if the...
  6. J

    Get Current

    You're right! I've had problems using single quotes from time to time (sometimes ACCESS seems to demand a double quote! :banghead:), so I've given up and just use a quote character. I've just found it's less likely to lead to problems.
  7. J

    Access VBA not changing Word Font.Color

    I'm using Access to change value in a Word document and I want to change the font color to red for numbers less than zero. Here's my calling code: Set oWord = CreateObject("Word.Application") oWord.Visible = True oWord.Activate Set doc = oWord.Documents.Open(fpath & "AF Final Costs Notification...
  8. J

    Populate PDF Forms from Access and vice versa (import values from Forms into Access)

    I hope to be getting Adobe Acrobat Pro soon, so I can try it, but it seems to me that you would just reverse the assignment. Instead of If f.type="Text" Then Fields.Item(f).Value = "something" you would have If Fields.Item(f).Value = "something" Then f.type="Text" Hope this helps.
  9. J

    Get Current

    Also, if Me.Contract is text, you need a quote character around it: Dim Quot_Char as String Quot_Char = chr(34) SQLstring = "SELECT * FROM [General] WHERE [General].[CONTRACT] = '" & Quot_Char & Me.CONTRACT & Quot_Char & "' ORDER BY EXTENSION DESC ;"
  10. J

    New to AW, not to ACCESS

    Hello all. I've been working with ACCESS, as well as EXCEL, WORD for quite some time, as well as VBA for all three. I'm largely self-taught but owe a great many thanks to forums like this!), I enjoy reading for pleasure and watching TV with my sweetie, here in Los Angeles, CA. Good to...
Back
Top Bottom