Search results

  1. A

    2 for 1 if you solve this....same prob as newberc

    There is a detailed and confusing SQL rowsource way of doing this but I'll stick to the simple way. I assume for this example that you have a table with the following field headings: Type, Name, Color (I'm American) On your form you have three combo boxes: TypeComboBox, NameComboBox...
  2. A

    Help - Wish to Delete Record Using a Command Button on a Form

    If you want to delete the CURRENT RECORD, you only need one line of code for your command button's OnClick event: DoCmd.RunCommand acCmdDeleteRecord If the field you mentioned filters out all of the other records, you will have only one record left and that will be your current record. If...
  3. A

    Newbie ?--pop-up text box based on combo choice?

    You are in luck. I have a two year old at home. First, create the text boxes on your form for account name (DpstName), account number (DpstAcctNo), and name of third party (ThrdPrtyName) as you normally would. You may want to rearrange them later when you see what we will do to them. For...
  4. A

    Different Text Color for Different Value

    In the control source for the text box try this: = Iif([NumberBox]<[LowPointBox] OR [NumberBox]>[HighPointBox],Format([NumberBox],[Red]),[NumberBox]) Let me know if this helps.
  5. A

    Insert Value Based on Combo Box

    I'm afraid that I can't help you without rutting around in your queries and seeing things for myself. That error message is a mystery to me. I'm sorry.
  6. A

    Insert Value Based on Combo Box

    Your problem may just be in the syntax. I noticed a typo in your code. You wrote: Me.[Unit Rate] = DLookup("[Cost Rate]", "[Job Costing Descriptions]", "[Account] = " & Me.[Description]) Eliminate the [] in the middle argument so that it reads: Me.[Unit Rate] = DLookup("[Cost Rate]", "Job...
  7. A

    Encryption/Decryption challenge

    It's lengthy. Drop me an email with your return address and I'll send it to you. I'd rather not post the whole thing here.
  8. A

    Insert Value Based on Combo Box

    The code I gave you is in Visual Basic, not an expression. In the On After Update event, you need to select "Event Procedure" instead of macro or expression. Once you have selected it, click on the "..." to the right of it. This will take you to the VBA code world. Then, paste the code in the...
  9. A

    subform controls (checkbox) events

    You have it more complicated than it needs to be. Shorter code is better. Try this: Private Sub CheckWhenComplete_AfterUpdate(Cancel As Integer) If MsgBox("Did you complete Action Item? This will cause the line to be deleted and sent to the comments table, vbOKCancel, "Deletion Confirmation")...
  10. A

    Insert Value Based on Combo Box

    In your Description_After_Update procedure type: Me.UnitRateComboBox = Dlookup ("[UnitRate]","TableWithTheUnitRates","[DescriptionUnitRateID] = " & Me.DescriptionComboBox You can type over this value if you want to.
  11. A

    Encryption/Decryption challenge

    I'm asking anyone out there: Is there a need for a encryption function in any databases that you've worked on? It would look like this: = Scramble([TheTextYouNeedScrambled]) which would result in something like this: ¢§ž±©ž§¬¢¯žY¬­š Unscrambling would be easy: =...
  12. A

    Changing Listbox Columnwidths

    Easy fix. It's a problem with twips. You should list your code with a measurement: listbox.columnwidths = "1 in;2 in;1 in" or listbox.columnwidths = "1 cm;2 cm;1 cm" You don't have to do this in the properties window but you must in VBA.
  13. A

    how to.........

    I wouldn't recommend duplicating any data within the same record let alone the same table. You should just reference the first two letters in Field_1 whenever you need them instead of moving them. You can reference them using the following: Left ([Field_1),2)
  14. A

    Sorting NotInList combo box lists

    By what you've written, the NotInList part really has no bearing on your sorting needs. For the RecordSource on the combo box, you will want to click the "..." to the right of it. Access will ask you if you want to build a query. Click OK and you will go the query design view. Select the...
  15. A

    Conditionally change text color

    Thanks for your response. The only part of the code I don't understand is the FormatCondition line. Is that only for Access 2000? The 97 version doesn't seem to know anything about it.
  16. A

    Create Select List Based on Results from Previous Field

    If this is your first time, I'll be gentle. You already know how to find the On After Update event procedures. That is where you previously set it to run a macro. Now, instead of running a macro, set it to "Event Procedure". Now, click on the "..." to the right of "Event Procedure". You are now...
  17. A

    Create Select List Based on Results from Previous Field

    Alright then. How about this? Instead of requering your form (obviously that doesn't work) try the following for your After_Update procedure. Set the focus to your Description combobox and then requery only the Description combobox. You should be able to do this through macros or better through...
  18. A

    Create Select List Based on Results from Previous Field

    Add an After Update procedure to your Cost Type combo box. Have it requery the form after you update it. This should reset the record source in your Description combo box.
  19. A

    Hiding a button on a subform

    Sorry, typo. This is the corrected code: DoCmd.OpenForm "frmContacts" Forms!frmContacts!frmContactsSubFormName.Form.YourCommandButton.Visible = True
  20. A

    Hiding a button on a subform

    First, set the Visible Property of the command button on the subform to No. We'll turn it visible only if the form is opened up. How do you open the form you are talking about? Is it with a command button? If it is, there is VBA code underneath it which tells Access to open up the form. That is...
Top Bottom