Search results

  1. Fornatian

    Reports

    First make your report with all possible fields then programmatically hide controls/labels and set control sources to null 'when the report opens Private Sub Report_Open(Cancel As Integer) Dim strResp As String 'ask the user which control source to use for the report and set it...
  2. Fornatian

    Textbox SELECTS Listbox Entry

    at a very basic level this works when the values typed appear in the list, when they don't the first item is selected because the function returns 0. Private Sub txtFind_Change() List0.Selected(FoundNo(Len(txtFind.Text))) = True End Sub Private Function FoundNo(bytLength As Byte) As Byte Dim...
  3. Fornatian

    Mail Merge

    Change the format of the field to mmmm d", "yyyy and that should do it. For your info, dates and times are stored as numbers in MS products and can be formatted anyway you choose really. Having re-read your question, do you mean mailmerge with word? If so there is another technique you can...
  4. Fornatian

    Determining Own Filename

    CurrentDb.Name will return the full path and name.
  5. Fornatian

    acCmdCompactDatabase

    As I recall Rich posted a simple solution to this eons ago, and it was to use the dredded sendkeys command to do Tools-Database-CompactDatabase. SendKeys "%tdc"
  6. Fornatian

    Export Problem

    Include the extension in your output to command to automatically give the file a .dat extension. DoCmd.OutputTo acOutputTable, "tablename", acFormatTXT, "C:\Test.dat", True
  7. Fornatian

    Query columns with no specific order

    rob, if you mean can i find all records with johnson in any of the four fields then yes you can. place the word 'johnson' as criteria for your first field, then move down and right a 'cell' and type 'johnson' and continue until all fields have 'johnson' under them diagonally as you look at the...
  8. Fornatian

    Converting ArtistNames to a sortable format

    This link leads to a post with a conversion function to change numbers to words. As for the more general problem, is there any other field which defines whether it is a persons name or a string of words or numbers, if you you can establish the rules of engagement and identify the right action...
  9. Fornatian

    linked picture

    that's strange, missing the path off works fine on my version(A97). Anyway to set the picture at run time add this code to the OnOpen event of your form: Me.MyPic.Picture = Left(CurrentDb.Name, Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) & "\YourPicture.Ext" Alternatively you could have...
  10. Fornatian

    Help using a complex and/or sequence

    PS. It is faster to create an extra query and use a join instead of a subselect statement.
  11. Fornatian

    Can't find macro message

    Look in the events tab for both the subform control and the embedded forms(and it's controls), there must be a . in one of the events fired when you tab across.
  12. Fornatian

    linked picture

    if the picture is in the same dir as the database then just don't use the path at all and it will automatcailly look in the db's directory. Otherwise use: Left(CurrentDb.Name, Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) to return the path of the current database and add your picture file...
  13. Fornatian

    Changing a text field to numeric for sorting

    I agree that in the long run a lookup table with coded responses would be better than the current situation, but as a stop gap this will work well: SELECT Code FROM Table3 ORDER BY IIf(Code="NP",99,CInt(Code)); Assuming that all your codes are full numbers and "NP" is a single exception.
  14. Fornatian

    report to destination as txt file

    like this? DoCmd.OutputTo acOutputReport, "YourReportName", acFormatTXT, "C:\Windows\DeskTop\TestFile.txt", True If you wanted to ensure you don't overwrite an existing file you can create the filename at run time and use this code to create a unique filename based on the date and time of...
  15. Fornatian

    Help using a complex and/or sequence

    Do you really need to build the query dynamically or just change the queried values, which is simpler because you can just reference form fields: SELECT YourTable.ID FROM YourTable WHERE (((YourTable.Category)=[Forms]![YourForm]![YourField1])); UNION SELECT YourTable.ID FROM YourTable WHERE...
  16. Fornatian

    Help using a complex and/or sequence

    SELECT YourTable.ID FROM YourTable WHERE (((YourTable.Category)=6)); UNION SELECT YourTable.ID FROM YourTable WHERE (((YourTable.ID) In (SELECT YourTable.ID FROM YourTable WHERE (((YourTable.Category)=7));)) AND ((YourTable.Category)=2)); This union query seems to work. It picks out those...
  17. Fornatian

    Trying to retreive Default Printer name (prtDEVMode)

    this looks useful http://www.microsoft.com/accessdev/articles/getzch10.htm?&gssnb=1
  18. Fornatian

    What's your best/worst joke?

    A man(the same man in the previous jokes, what an unlucky b*****d), phone his doctors emergency line. The doctor answers, the man says "Doctor, you've got to visit me immediately, I think I've punctured my colostomy bag". The doctor, concerned by the man's predicament says "Where are you...
  19. Fornatian

    very basic question

    http://www.experts-exchange.com/Databases/MS_Access/Q_20705546.html
  20. Fornatian

    tables tab in object bar

    It is probable that your tables and queries are hidden. Look under Tools-Options-View tab (in Access97 anyway!) and select to view hidden objects.
Back
Top Bottom