Search results

  1. M

    Help With Searchable Form

    What you are wanting to do is referred to as "cascading combo boxes". Click the link below to download a small demo file in a zip file that should help you get started> http://www.askdoctoraccess.com/DownloadableFiles/DemoCascadeComboBoxes.zip
  2. M

    IIF(FormatDateTime....

    You do not need the IIF statement. Just use the Format function like: YourDate: Format([YourDateField],"mm/dd/yyy") In the code above, just change the "YourDate:" to what you want the output field to be named and replace the "YourDataField" with the acdtual name of your field.
  3. M

    carraigew retu

    Try this: 'declare variable Dim psFreeText as String 'if the form is unboud, set focus to the control so value can be read me.txtFreeText.Text.setfocus psFreeText = Replace(me.txtFreeText.Text, Chr(13) & Chr(10), " ") this should assign a string to the "psFreeText" variable containing...
  4. M

    Access and PDF attachments

    I concur with the idea of just storing the path to external files, not actually importing to the new field type. When sending email you just specify the path to the desired file so sending the attachment should not be a problem.
  5. M

    Set Focus but cannot edit form text control

    Are the fields from the same or different tables? If the fields are from different tables that would explain why you cannot edit them. If you specifically need the interface to work as you have described it, you may have to make the controls "unbound" and then when ready, use code to write the...
  6. M

    Navigation Control with query

    Try modifying your code to: Private Sub WorkingInitial_Click() Dim strSQL As String strSQL = "SELECT * FROM [Table1 Query].[My.StatusInitial] WHERE StatusInitial = 'Working';" me.List0.RowSource = strSQL End Sub
  7. M

    Create Tables via VBA

    You would not want or need to be creating tables on the fly. This is almost never a good idea. What you are experiencing is what is know as a many-to-many relationship. This situation is created by the fact that you can have a combination of any of the values from multile tables. Try...
  8. M

    Positioning Controls with Code

    I may be missing something here, but I don't see a question.
  9. M

    Add new record in main form

    This sound like you have used a query as the Record Source for your form and that this query is not an updatable query. If you have multiple tables included in your query you may have created a relationship between the tables that will then not let you create a new record. Check the query to...
  10. M

    Replace Function

    Try using the Left(), Mid() and Right() functions. Using these functions, you can create a statement that will return just what you need.
  11. M

    Import txt files -> Text converted to number

    When you are using the Import Excel data option in Access the First screen of the wizzard lets you indicate that the first row contains column headinga, if you click the Next button that screen lets you click on each of the columns of the data you are about to import and set the data type along...
  12. M

    Data Macro Nightmare!!!

    You might want to take a look at this link: http://www.opengatesw.net/ms-access-tutorials/Access-2010/Microsoft-Access-2010-Data-Macro-Benefits.htm In the first paragraph it talks about " (there are ways around this by placing Data Macro logic in the table in it's native database, the logic...
  13. M

    The Forum just got faster!

    Yes, Jon, the forum is much snapper. Thank you for all you do for the forum. Your work is appreciated.
  14. M

    Import txt files -> Text converted to number

    Have you tried creating an Import Specification and using that to do the import. When defining the Import Specification you can define the fields that are text and other types of data.
  15. M

    Using SQL to open Recordset, keep getting error 3011, could not find object

    Is "qryInstr" the name of your table? You are trying to use "*" in the query definition string after you have already specified a specific field (ClassID). If you want to return all fields you can use the "*" otherwise you need to specify each field you want to return from your table. Try...
  16. M

    Using SQL to open Recordset, keep getting error 3011, could not find object

    Try removing the "dbOpenTable" from this line: Set IID = dbs.OpenRecordset(strSQL, dbOpenTable) Just use: Set IID = dbs.OpenRecordset(strSQL)
  17. M

    InStr Query

    If all you need is the last three characters of the string why not use: Right(([Sizes S],3)
  18. M

    Auto Poplulate textbox with Combobox Selection + String

    Here is some code that will do what you want. Create a new module and paste the code below into it. Option Compare Database Option Explicit Dim rs As DAO.Recordset Dim strSql As String Dim strMaxNum As String Public Function NextCaseCode(AgencyCode As String, CodeYear As String) As String...
  19. M

    Print report directly

    The way that I deal with this type of thing is to provide users with options for what output they want for their report. I place an Opton Group control on my form and include options like: Preview Report, Send to Printer, Export to Excel and Create PDF. Then in a Coommand button's Click Event...
  20. M

    Append query or not?

    Your process sounds correct, as long as your "EmployeeSkills" table has a Record ID field, a EmployeeID field (foreign key to the employee table), a SkillID field (foreign key to the Skills table) and a Status field to store either "not trained", "in training" or "acquired". You might also...
Back
Top Bottom