Search results

  1. R

    programmatically setting field's default value

    I would think, from my many years experience, that changing a text boxes default value is considered a DESING change!, but maybe that's just me. BTW, con_Quote is a constant with the value of """ And, yes the code you have written is what *SHOULD* work, but the reason I'm posting here is...
  2. R

    programmatically setting field's default value

    I'm trying to change the default value of an item whenever the value in a field changes. I have the code executing just fine, but for some reason it's just not saving, even with the following line of code DoCmd.Save ObjectType:=acForm, ObjectName:=Me.Form.Name This is what I'm trying to...
  3. R

    Create Manual Header Line For Exported Csv File

    I didn't read through the entire thread, but was responding to Husky that asked if there was a fieldname option in transfer text. if you are wanting to export a file based on a dynamic set of criteria that the user can configure via your form, then I am pretty sure you have the right way with...
  4. R

    Update Data Loop

    I don't know if I'm understanding completely, but you may just want an "update" query. Create a new query and select the desired table, then only chose the KeyStamp field, and open the query in dataset mode. Copy the value you want (the first value shown, if I'm understanding), then go back...
  5. R

    Create Manual Header Line For Exported Csv File

    the docmd.transfertext has a parameter called HasFieldNames If you are importing, it will treat them as field names for your tables (matching them up accordingly if you have corresponding field names in your table) If you are exporting, it creates a header column for your text file.
  6. R

    AfterUpdate...I Think...

    If your combo box has multiple columns then you may be seeing "5" but the value in the combobox could be different. Try placing a breakpoint on the Select Case line of code (pressing F9) then go into the Immediate window and do ? Me.Score to see what the actual value is.
  7. R

    Help with login Code

    My recommendation would be when the user validates their log-in (username and password) and clicks the "log-in" button or whatever it is called, just hide the log-in form, and you'll be able to refer to that control without worrying about calling up a database reference or anything like that...
  8. R

    AfterUpdate...I Think...

    Yes, you can make the value of a text base be filled in based on the selection of a combo-box, in the After_update event Select case me.cbo_Combo_Name case "First choice" Me.fld_ControlName = "this is your first choice" case "Second Choice" me.fld_ControlName = "This is choice #2" case else...
  9. R

    adding new records to a table through a form

    I did something very similar to this with my first Access database. it was an auditing application for a manufacturing company that tracked when a "lot" was moved from one department to another - they wanted to see how long each type of product took to push through each department. There is a...
  10. R

    Refresh Textbox with new data

    I apologize for this, but after I re-looked at what I posted and saw that you said it didn't work, I know exactly what happened, and I don't know why I even thought that a simple refresh/requery would do the trick. I completed spaced when I posted that, and am suprised, especially since I even...
  11. R

    Refresh Textbox with new data

    How to update that list depends on how you are filling in that list in the first place. For example, is this a continuous form (looks like the tabular wizard) and your data is bound to the form directly? or are you using some other method. Since your query.doc shows the Update/Refresh section...
  12. R

    Send email from form when inventory is low

    When you reference getting an error - it is usually better to somehow signify where the error occured, but fortunately, I am betting it was stopped at this line If rsRecord("Avail") < "4" Then Whenever you use quote marks " it signifies text, so you will want to drop them and change it to If...
  13. R

    string manipulaton - remove unwanted characters

    Looks like that did the trick- I can't remember what I was trying, but I know what I was looking at had to do with doing this via Excel.. anyways, you're code worked like a charm, thanx
  14. R

    Syntax Error Runtime 3144

    I am not sure if you would get a run-time error for a syntax problem with & and the like, but that is always my first suspicion, though in this particular case, I may be wrong. I did however copy and paste what you originally posted into notepad myself and cleaned it up to see if I could spot...
  15. R

    Send email from form when inventory is low

    I think what you're wanting is to create a recordset that uses the same SQL as your existing query - this would allow you to use the recordset in the code I posted. Here is what I think you want, together with what I have already posted Dim appOutlook As Outlook.Application Dim olMailItem As...
  16. R

    Syntax Error Runtime 3144

    can you put a breakpoint in the next line of code, and do a debug of mysql variable? If you get an error on this line and it doesn't proceed any further, then there is a syntax problem somewhere with your &'s and "'s or something. Post your results here and we can see what is happening. Btw...
  17. R

    Simple Windows user identification

    I think you are wanting the following environ("username")
  18. R

    string manipulaton - remove unwanted characters

    Hi guys, I'm hoping that someone here may have needed to accomplish what I need to do and have already written a solution, because I have already done some net searches for this an can only find an Excel solution that doesn't port over to Access VBA. I have some data that is being imported from...
  19. R

    Send email from form when inventory is low

    You must first make sure you have the reference to Microsoft Outlook (hopefully you are using 2003, or if you are using 2007, hopefully the code will work the same), but you need to add this refeence by going to Tools --> Preferences --> Microsoft Outlook XX.XX Objet Library Then, drop the...
  20. R

    Refresh Textbox with new data

    Yes, I can see the document ... so, you have a list of "report periods" and you want someone to be able to click on any given on in the list, fill that value into an unbound text box, then when the user changes it and clicks "update" that old value is updated with the user's changes. Is this...
Top Bottom