Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. chickey

    Question about VBA (easy!!!)

    You can return values by assigning the value to the function name - try this: MyFunc = MyString Regards...
  2. chickey

    Type Mismatch - not sure why

    The mismatch problem is that when you are trying to put the / into the text you are executing, it is ending the string with the first " which means Access then sees a / out on its own i.e. not part of the string you are trying to build. You need to replace all of the " / &quot...
  3. chickey

    updating recordset with VBA problem

    Looks like you are trying to open a table and not a recordset, so change the line to the following: Set rst = CurrentDb.OpenRecordset("select * from tblDepartment", dbOpenDynaset) Regards...
  4. chickey

    How do I supress Access's message b

    Try DoCmd.SetWarnings = False before you run the queries. Make sure you do a DoCmd.SetWarnings = True when finished. Also, make sure you have a DoCmd.SetWarnings = True in the error handler for the procedure you use it in (just in case). Regards...
  5. chickey

    refresh the database, queries window, or connection?

    I'm afraid I'm not going to be much help to you on this. I'm not hugely familiar but tried to find some info on it anyway. The only way I could find to refresh the procedures collection is to use adox like so (which is not how you want to do it): Sub ProcedureRefresh() Dim cat As New...
  6. chickey

    refresh the database, queries window, or connection?

    Firstly, there is no point refreshing until you have created the query, so put the refresh in after the 'DoCmd.RunSQL SQLstr'. I'll check out your code when I get to my home PC which has Access 2k on it - Access 97 here (love those corporate software standards). Regards...
  7. chickey

    dynamic form creates visible module

    You could try turning off the screen echo when doing the module creation like so: Application.Echo False DoCmd.Hourglass True ' 'Do module creation here ' Application.Echo True DoCmd.Hourglass False Regards...
  8. chickey

    refresh the database, queries window, or connection?

    Try refreshing the querydefs collection - this would then show the new query as existing: CurrentDb().QueryDefs.Refresh
  9. chickey

    Removing embedded blanks

    Alternatively, in Acc2k (I think) there is a function called 'replace', and used like this: replace("1 2 3 4 6", " ", "") it may be what you are looking for if you want to do it all in one function. Regards...
  10. chickey

    Printint report with no data

    Only way I am aware of checking this is to either run the report and check for nodata as you are doing or run the report's underlying query and then check for its recordcount. If you are going to do the second method, and you are running a complicated query, then you will essentially be...
  11. chickey

    Printint report with no data

    This is how I call a report and trap (and discard) the no data error Access throws up: DoCmd.OpenReport v_Report, v_Options 'Don't display error message twice (i.e. report already displays it) If Err Then vErrNo = Err.Number vErrDesc = Err.Description If vErrNo = 2501 Then...
  12. chickey

    String Manipulation

    Not 100% sure what you want, but if it is to display the codes on individual lines in a textbox on a form or report, then in your splitting code, add a vbCrLf to the split line after each code is added to the variable, e.g.: vCodes = vCodes & lstrCode & vbCrLf Reply if you still have...
  13. chickey

    Importing

    Try the following: DoCmd.RunCommand acCmdImport Regards...
  14. chickey

    ow to list all tables and queries in access

    Modify the code to include the following as an additional case in the select case statement: Case "Macros" If Application.CurrentProject.AllMacros.count = 0 Then MsgBox "No " & pObjectType & " exist in the database" Else For i = 1 To...
  15. chickey

    ow to list all tables and queries in access

    I use the following function to populate a listbox on an export form which allows the user to see tables, queries or reports in a listbox according to their selection (sent in as pObjectType). Reply if you still have problems. Regards... == Public Function ListObjects(pObjectType As String)...
  16. chickey

    Bringing it all together - form as criteria for query to gen report

    Hi Steve, Easiest way is to create a button and use the wizard that pops up to call the report. Create a button on the form and the wizard will pop up. Select Report operations and then select either "print report" or "preview report". Then select the report to...
  17. chickey

    Bringing it all together - form as criteria for query to gen report

    Have you checked your formname and your combobox name? You are using [Forms]![SelectContractor]![Engineer]. Is your form named SelectContractor? Is there a combobox named Engineer on that form? Once, you have this sorted, create a new report and base the report on the query you have created. If...
  18. chickey

    Bringing it all together - form as criteria for query to gen report

    If I am getting the whole picture, you just want to have the query criteria picked up from the form at the time of running the report? If so, say the form is called frmYourForm and the form field (which I assume is a listbox) is lbxYourContractor, and the field in the query (say...
  19. chickey

    Coming from Access?

    My experience is in Access, VB and R:Base - also SQL Server, MySQL and some PostGres. I am looking to evaluate PowerBuilder and want to get a real feel for the product by doing a fairly decent application that I have already developed in one of the others above (as you do to get used to a new...
  20. chickey

    Coming from Access?

    Anyone?

Part and Inventory Search

Back
Top