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 SkipVought 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: *

  • Users: PaulF
  • Order by date
  1. PaulF

    DoCmd.TransferSpreadsheet import

    After each import, you might query table MSysObjects for Type = 1 (local table) and instr([Name],"ImportError") > 0 (contains import error in the name). If one exists you can rename the existing table with the import errors to one you can recognize using DoCmd.Rename "OldtableName", acTable...
  2. PaulF

    vba to execute ftp script

    I usually put the script into a text file with a .bat extension. I can call the batch file using a ShellAndClose command provided from Shell32.Bas, Copyright ©1996-97 Karl E. Peterson PaulF
  3. PaulF

    Delete query question - duplicate field?

    What you have appears to be an SQL statement created using the Create- Design View (Query-By-Example or QBE) in Access instead of writing it in code. When you create a Delete query in QBE you select the * from the field list, but if you aren't deleteing all of the reocrds you must also select...
  4. PaulF

    Convert a string with a field to a carriage return

    I created a table with 2 fields, DataIn & DataOut. I had info in DataIn that contained <br /> and I ran this code to populate DataOut with a Carriage Return/Line Feed instead of the <br /> and then when I printed the data, it printed out fine in a report. Dim db As DAO.Database, rst As...
  5. PaulF

    form copying/importing not working

    I'd try renaming/deleting the old form, compact/repair the database and then import the new form. PaulF
  6. PaulF

    Counting child records

    One method is to use DCount() to check the table for a count of the records with the Primary Key value. If DCount returns zero, open the form to add a new record, if DCount returns 1, open a form with the filter set to the Primary Key, if more than one you can either populate a combobox/listbox...
  7. PaulF

    Random Draft Order

    I discovered that this code could hang up if it had one team left in the round and that team had already selected in that spot in a previous round. The fix required an Array, a new table, a query to reset the values in that table and code to check to see if the situation existed, and to redo...
  8. PaulF

    Edit Right Click Menu access 2010

    try looking into macros.. see this link http://www.databasejournal.com/features/msaccess/article.php/3790286/Setting-Up-Right-Click-Menus-for-Access-2007.htm
  9. PaulF

    Random Draft Order

    then it wouldn't be random would it. I thought by ensuring each team received one pick in each round until it exhausted it's pick was making it fair. I had originally used just a random process that sometimes ended up with the team with the lowest number of picks not getting a pick until the...
  10. PaulF

    Random Draft Order

    build the 2 tables, populate tbl_Teams with a record for each of the teams and number them (numerically starting with 1) and enter the number of picks into the field Entries. Either build a form to put the code behind or put it in a module. Then call the code from either the form or the...
  11. PaulF

    Random Draft Order

    Not sure if this is what you're after or not. I've created two tables: tbl_Teams with 3 numeric fields TeamNum Entries Drawn tbl_Draft_By_Rounds with 21 numeric fields DraftRound Position1 through Position20 Pirmary Key is DraftRound This allows you to have up to 20 teams with unlimited...
  12. PaulF

    docmd outputto

    use a query sorted on the key field but don't show that field and then output the query using TransferText PaulF
  13. PaulF

    Output to PDF

    I made a typo.. I used strDocName instead of stDocName, change that and it should work. PaulF
  14. PaulF

    Output to PDF

    Try using this DoCmd.OutputTo acOutputReport, strDocName, "PDFFormat(*.pdf)", TheFile & strDocName & ".pdf", False, "", 0, acExportQualityPrint PaulF
  15. PaulF

    ASCII Character

    Skip, Your function works if fed upper case Characters only. If you change sByt = Mid(Val, Len(Val) - i, 1) to sByt = Mid(Ucase(Val), Len(Val) - i, 1) you can pass lower case revision numbers and get the correct answer without UCase passing "aa" returns "AGG" with UCase passing "aa"...
  16. PaulF

    Submit Form Data

    You probably need to check out the samples in the Northwind database that comes with ACCESS. It's not added as part of the normal installation, but it gives you some examples to learn from. PaulF
  17. PaulF

    how to query multiple fields

    Or something along this line dim strWhere as String strWhere = "" If Len(Trim(Nz(cboName,"")))>0 then strWhere = "[Test].[Name] = '" & cboName & "'" End If If Len(Trim(Nz(cboCompany,"")))>0 then If strWhere <> "" Then strWhere = "[Test].[Company] = '" & cboCompany & "'" Else strWhere =...
  18. PaulF

    enter value into variable from sql statement.

    Larry, yes I did, thanks for correcting the error. PaulF
  19. PaulF

    enter value into variable from sql statement.

    try using DLookUp() user_priv = DLookUP("[team_lead_flag]","qa_employee_list","[userid] = " & strUser ) PaulF
  20. PaulF

    Send keys problem

    this is because Vista doesn't recognize the SendKeys used by previous versions. I got this from the web, and altered it to call the F11 key. Option Compare Database Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal code As Long, ByVal maptype As Long) As Long Declare...

Part and Inventory Search

Back
Top