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 Chriss Miller 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: Hanss
  • Content: Threads
  • Order by date
  1. Hanss

    Query which shows results?

    Hi, I am wondering if there is anyway to do this with an access query: I have table1 with two fields and data: Temp: Count: 15 2 20 3 I would like a query that generates the following results: Results: 15 15 20 20 20 I would...
  2. Hanss

    Pass criteria from a text box to a query.

    Table1 contains 4 records: Red Black Green Pink When I put the following in the criteria of a query I get two records: “red” or “black” My problem: I have form1 with a texbox1. I put the following in the query criteria: Forms![form1]![texbox1] I type the following the textbox1...
  3. Hanss

    Merging Table Data

    I would appreciate if someone could point me in the right direction: This is the data that I have in table1: Field1 Field2 Field3 10 20 30 40 50 60 I would like a query or vba that merges the data into this: Field1 10 20 30 40...
  4. Hanss

    How to calculate a formula in a text box?

    I have an access form with: text field "text1" text field "result" command button: "button" If I enter "2 + 5" in text1 and press the button I would like VBA to put the answer: "7" in the result field. This only puts the formula "2 + 5" in the result field: Me.result = CStr(Me.text1) Would...
  5. Hanss

    VBA for returning the name of a file.

    Hi, I have a form with a button and a field called "file" When I push the button I would like the code to find the name of an unknown file in C:\test\ and then put it in the field "file" What I have tried: Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Me.Name =...
  6. Hanss

    VB code in a Text Box?

    I have a form with two text boxes named "text1" and "where" This code will put "2" in "text1": me.text1 = 2 Question: How can I do this? Type "me.text1" into the "where" box and VB puts "2" in the "text1" box, not the "where" box. Many Thanks! Hanss Zürich
  7. Hanss

    Error: Variable not defined.

    I am trying to use the following code on access xp (SP3) and I get the complile error "variable not defined" at: Clipboard.GetData(vbCFBitmap) I would appreciate any help as to why this is happening. Do I need to upgrade my VBA? Many Thanks! Kind regards, Hanss Zurich, Switzerland My...
  8. Hanss

    Picture in SubReport is cut in half ?

    I have an access report with a subreport which includes a picture. When I print the report, the picture is cut in half instead of being printed on the next page. Is there any way of stopping this from happening? Hanss Zurich, Switzerland
  9. Hanss

    Send access table directly with CDO?

    Is there any way of sending an Access Table (in excel format) with CDO directly without dumping it to a file first? Kind regards, Hanss Zurich, Switzerland The following code does what I want BUT can it be merged into the CDO code? DoCmd.SendObject acTable, "Table1"...
  10. Hanss

    Import file names from subfolders into an access table.

    The following code creates a new table in access and imports the file names into the table. The problem is that it only imports the names from the last subdirectory, not from the other directories. Would appreciate any help in fixing this. Hanss Zurich Command in immediate window: ...
  11. Hanss

    Moving the Mouse Pointer using VB

    I would like to move the mouse pointer using VB. I have a form named "form1" and a button named "button1. When I click button1, I would like the mouse pointer to move down about 1 inch. If this is not possible, or too difficult I would also be happy if the cursor would move to a specific...
  12. Hanss

    Change properties of a rectangle named in a field.

    I have a form "form1 with an unbound text box: "pos2". I also have a number of rectangles(a1, a2, a3 etc.). I also have a command button "Command59". I would like to enter the name of a rectangle in field "pos2" and when command59 is clicked, change the back color of the rectangle that was...
  13. Hanss

    Return Object Name with VB?

    I have an access form with a number of rectangles (box1, box2 box3 etc.). I also have a field named "position". On the "On Mouse Move" of "section detail" I would like to have some code that enters the name of the object where the cursor is, into field "position". For example, when the cursor is...
  14. Hanss

    Change Mouse Settings with VBA

    I would like to change the mouse/cursor movement ratio when I open an access form. For example, if the mouse moves 60 cm the cursor only moves 1 cm. This appears to be possible with the following code by setting the amount of distance the mouse moves to get the cursor on the screen to move (dx...
  15. Hanss

    Solid Cubes in DXF

    I am working on a project where I need the most simple dxf file possible, without any needless information. Description: 4 solid cubes with the colors green, black, red and blue placed together to form a large cube. Each cube should be 1 cm3. I would appreciate any help! Kind regards Hanss...
  16. Hanss

    Parsing Problem.

    Strings one and two work fine, but when I try to combine them get a parsing error: One - This works: ?DEnd("[area]","last", BuildCriteria("[station]",dblong,"=" & Forms![dcform]![station])) Two - This works: ?DEnd("[area]","last", BuildCriteria("[process]",dblong,"= 1")) I tried to combine...
  17. Hanss

    Can I show the value of the NEXT record in a query?

    I have a table "test" with the following fields and data: id: date: 1 16.01.2006 2 17.01.2006 3 19.01.2006 4 21.01.2006 Is it possible to have a query with an additional field "date2" which displays the "date"...
  18. Hanss

    Importing an empty excel table into Access

    The following code imports “temp.xls” into an access table “import”. However it fails if temp.xls does not contain any data: ResultCode = Worksheet.SaveAs("C:\temp.xls", 4, 0) *** see below DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "import", "C:\temp.xls", False, ""...
  19. Hanss

    Can I import a field name into a query?

    I have a query that looks like this: SELECT [Forms]![form1]![fieldname] AS field FROM Table1; In form1 I have a field named fieldname where I have entered "field1" What I want the query to do is display the data of field1 in table1. The problem is that only "field1" appears when I run the...
  20. Hanss

    How can I stop an application in VB ?

    I am having trouble closing an application (scan.exe) which I am running from access in VB. Here is what I tried: application.quit (this closed access!) scan.application.quit (error message) Any help would be greatly appreciated. Hanss Zurich Here is my code: Public Function...

Part and Inventory Search

Back
Top