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. PJStephenson

    pass a table name to a function to open a recordset

    a couple of things to try dim db as dao.database, rst as dao.recordset make sure you have a reference to DAO and you forgot dim db = currentdb and possibly try rst.field("fieldname").value = 300 it should work ask long as the string you pass is a valid table or select query name...
  2. PJStephenson

    DSum Syntax...I Give Up!

    couple of things Me.txtCpesNeeded = DSum "[creditsReceived]", "subqryCpeLetter", "[sortNum] = " & Me.txtSortNum & " AND [appliedOn]>=#" & format(Me.txtNextAnnivMinusOne,"dd mmm yyyy") & "#") possibly [η][β][π]
  3. PJStephenson

    Embed Query Results in an Email

    You could try exporting the queries as html files then reading them back into the body of an email. I think Outlook allows html formatted mail. Peter [η][β][π]
  4. PJStephenson

    Red, Green and Blue Values from a colour ?

    Try this: the colour code is made up of the RGB values added together R * 256^0 + G * 256^1 + B * 256^2 (if I remember correctly) so you should be able to reverse it using Mod and integer division [η][β][π]
  5. PJStephenson

    ‘Cannot use the crosstab of a non-fixed column as a subquery’ Error

    Just a thought,is this causing your problems? End Select Next rst.Clone Set rst = Nothing [η][β][π]
  6. PJStephenson

    SQL HELP

    You have managed to get two WHERE clauses into your SQL string. The first one is set in your IF statements and if the criteria is not blank becomes the WHERE statement on your SQL String. Try removing your new text and putting another if statement to build up your where criteria. something...
  7. PJStephenson

    Autonumber Groupby Query

    You've got public and local variables with the same name, it could get confusing. [η][β][π]
  8. PJStephenson

    Table to Text File to Email to Text file to Table

    Have a look in the FAQs or try thread707-691439 HTH Peter [η][β][π]
  9. PJStephenson

    Parameters for MS Access Query

    You can use QueryDefs to re-write the SQL behind the query before allowing the mailmerge to connect to the data. If it is something as simple as "SELECT * FROM [tblYourTable] WHERE [IDNum] = 3;" then it is fairly simple, somthing like: currentDB.QueryDefs("qryYourQuery").SQL = strSQL HTH Peter...
  10. PJStephenson

    REPOST:How can I Print saved SNP files from code?

    try this: Dim snp As SnapshotViewer Set snp = New SnapshotViewerControl.SnapshotViewer if that doesn't work make sure you have the file snapview.ocx on your system HTH Peter
  11. PJStephenson

    REPOST:How can I Print saved SNP files from code?

    Have you got the 'Snapshot Viewer Control' ticked in references?
  12. PJStephenson

    Issue with Access / Excel - Losing AddIns

    Have a play with the addins property in excel, possibly as part of the open procedure. I use something similar: AddIns.Add Filename:="PathToAddin\AddinName.xla" AddIns("AddinName").Installed = True HTH Peter
  13. PJStephenson

    Operation Not Allowed

    Sanan CancelEvent is only of use in the event part of a form or report. For example if you have an on_unload sub then it can check if criteria are met and if not cancel the close event. Your code runs off the on_click event and if criteria are met goes to a new record, if not displays a msgbox...
  14. PJStephenson

    Operation Not Allowed

    In the code you have posted there is no need to cancel event. I am assuming that this is your add new record button script. To refresh your subform you might need to use me.[subform].refresh or me.[subform].requery depending on what you are trying to do, try both and use help to make it work...
  15. PJStephenson

    Operation Not Allowed

    Ok, here is some code I wrote to check if details had been changed and if so log them. It uses the BeforeUpdate event which runs before a form is closed or before the record is changed ie next, previous, newrec, Private Sub Form_BeforeUpdate(Cancel As Integer) DoCmd.SetWarnings False If...
  16. PJStephenson

    Link To Lotus Notes - Error

    What sort of Link? Is it a linked table? if so check that you have a DNS to the notes database, should be in the Control Panel under ODBC. If the servers have changed or you have moved PCs then you will need to edit/recreate it. HTH Peter
  17. PJStephenson

    Operation Not Allowed

    I think you want DoCmd.CancelEvent but you have to use it on the unload or beforeupdate events rather than close. HTH Peter
  18. PJStephenson

    Cannot update. Database or object is read-only. (ERROR)

    Have you tried to delete the file if it exists. Try using the FileSystemObject to check if the file exists then delete it. Peter
  19. PJStephenson

    transfertext with a vby defined query

    This is DAO code for creating a Query Dim objQueryDef As QueryDef Set objQueryDef = New QueryDef objQueryDef.Name = "TempQuery" CurrentDb.QueryDefs.Append objQueryDef CurrentDb.QueryDefs("TempQuery").SQL = strSQLquery and to remove try CurrentDb.QueryDefs.Delete "TempQuery" HTH Peter
  20. PJStephenson

    Cannot update. Database or object is read-only. (ERROR)

    I got that message today when trying to do an export of a table. It only happened when I tried to export to the same folder my Database was in. Is this the case for your code as well? HTH Peter

Part and Inventory Search

Back
Top