Search results

  1. J

    I don't understand this error message

    Not sure how you are running the query. Because the table is linked, you don't need to do anything special to append data into a linked table. The query is the same as if you were appending to a local table in the front end. If you already know the above, post back with the sql of the query. If...
  2. J

    Iif statement too complex

    How to use a separate table for this is not exactly straight forward. Here's a link to Doug Steele's approach to this problem. The article's available for free at http://www.vb123.com/kb/200412_ds_aa.htm
  3. J

    MDE created in Win7 don't run xpwin

    For the last 5 (at least) years, the access MVP's have been saying to create the .mde file using 1. The lowest common denominator version of access that your users have. 2. On the OS that your users have.
  4. J

    aspostrophe in SQL

    Dim sql As String sql = "SELECT blah blah, [Outstanding Invoices].Client" sql = sql & " FROM [Outstanding Invoices]" sql = sql & " GROUP BY blah" sql = sql & " HAVING ((([Outstanding Invoices].Client) = """ & clientSelected & """))" sql = sql & xyz;"
  5. J

    aspostrophe in SQL

    Post the sql. Here is an explanation of how to handle apostrophes in sql. http://allenbrowne.com/casu-17.html
  6. J

    Question Opening database

    Do you have a start up form set for this database? Does that startup form open when the database opens?
  7. J

    MDE created in Win7 don't run xpwin

    If I create an .accde in A2007 OS Win7 where I also have Office 2010 installed and try to open the db in A2007 OS Vista - it won't run due to reference problems. I wonder if this could be related somehow to your problem. If you have the original .mdb file, try running that on the Win xp...
  8. J

    Create a Report from a Subform within a Main form?

    You should be able to easily open a report which shows all the employees on the subform, using a button on the main form. The code for the button If Not IsNull(Me.ListResult_list) Then Debug.Print Me.ListResult_list DoCmd.OpenReport "IndividualEnroll_Report", acPreview, , "SEID=" &...
  9. J

    Create a Report from a Subform within a Main form?

    I see that you don’t have a field called EmployeeID in the record source of your subform. What is the name of the field that uniquely identifies each row of the subform? Do you have a table for employees and what is the primary key of that table?
  10. J

    Create a Report from a Subform within a Main form?

    Post the query that is the record source for the subform.
  11. J

    Create a Report from a Subform within a Main form?

    What is the table that the main form is based on? What is the table that the subform is based on? What is the primary key for the table the main form is based on? What is the foreign key for the table the subform is based on? Go back to the button for the report and put this line above the line...
  12. J

    Create a Report from a Subform within a Main form?

    Perhaps it will work better if you put the button to open the report in the subform. Use code like this: DoCmd.OpenReport "IndividualEnrollment_Report", acPreview, , "EmployeeID=" & Me.EmployeeID Perhaps you got error when the code was in the main form because you are not understanding the...
  13. J

    Create a Report from a Subform within a Main form?

    When you say "However, the EmployeeID field (in Subform) has condition: WHERE [tblEmployee].EmployeeID=[EmployeeEnrol_*subform*].EmployeeID" What do you mean 'has a condition'? Where is the condition? Why do you have an asterisk in [EmployeeEnrol_*subform*]? How many subforms do you have on...
  14. J

    Print preview command button problem

    The code I have written goes on the click event of the print preview button. It opens the report in print preview mode so the user can view the report before they print. You need to replace your code DoCmd.RunCommand acCmdPrintPreview - (that doesn't work) with the code I posted to open the...
  15. J

    Create a Report from a Subform within a Main form?

    You use OpenReport: DoCmd.OpenReport "RptMyReport", acViewPreview, , "EmployeeID=" & Me.SubformControlName.Form.EmployeeID Note: replace RptMyReport with the name of your report. This code goes on the click event of a button on the parent form. This code assumes that EmployeeID is a number...
  16. J

    Print preview command button problem

    Use OpenReport instead. DoCmd.OpenReport "ReportName", acViewPreview If you want to open the report and show only some of the records, use the WhereCondition argument. vba Help on OpenReport explains how to do it. Replace ReportName with the name of the report you want to open.
  17. J

    double click a record in a report...

    Your question appears to be asking how to double click on a report and open a form filtered to that control's value? You can double click on a control on a form and open a report to show a report filtered to that control's value. It doesn't work in reverse - reports are just for displaying data.
  18. J

    junction table design. Records won't fill

    To design a form for entering data into a 3 table many-to-many relationship, I find that this works for me. Create a main form based on one of the One - side tables. Create a subform based on the junction table. On the subform put a combo where user can choose a value from the remaining One -...
  19. J

    Dynamically search multiple fields question

    Looking at searching by date. You can set the format property of the 2 date text boxes to short date. Again, the sample search database by Allen Browne has the code you can copy and use to search by date range. It also shows how to search by a date range where the dates can include dates as...
  20. J

    Dynamically search multiple fields question

    Thanks for your patience - I have been away from the forums over Easter. I looked at your database. When you put a number or a date in the search box, InStr(Len(SrchText), SrchText, " ", vbTextCompare) evaluates to false and your code skips down to the exit sub line. I use the JStreet Tech...
Back
Top Bottom