Search results

  1. geekay

    Search through an Access table

    Sure... No harm in setting record set to Nothing explicitly. Let me quote from Access Help Understanding the Lifetime of Variables The time during which a variable retains its value is known as its lifetime. The value of a variable may change over its lifetime, but it retains some value...
  2. geekay

    Search through an Access table

    Hi bob Thank you for your comments I didn't use "Set rs = Nothing" just because rs is a procedure-level variable, the lifetime of which ends when the procedure ends unless it is declared using the key word 'Static' instead of 'Dim'. The statement 'rs.Close' also may be excluded if it is not...
  3. geekay

    Search through an Access table

    Dim strSQL As String Dim rs As ADODB.Recordset, Cn As ADODB.Connection Set rs = New ADODB.Recordset: Set Cn = New ADODB.Connection Set Cn = CurrentProject.Connection strSQL = "SELECT tablename.* FROM tablename WHERE tablename.UID = " & ValueOfUID rs.Open strSQL, Cn, adOpenDynamic...
  4. geekay

    recordset woes!

    Look into the psuedocode given below Do While Not rs.EOF Do whatever you want Loop If the cursor type is static then you can use the rs1.RecordCount If rs1.RecorCount = 0 then GoTo TheLabelYouSuggest Else Do whatever you want End If
  5. geekay

    Switchboard front end

    Please see that I have made a correction in my reply
  6. geekay

    Switchboard front end

    Split the database as said above. Put the database back end in the main/server system Copy the front end in whichever machines you need Open the front end on ech copy Use Link Table Manager to refresh the links Bowse the path via the network places
  7. geekay

    converting figures to words

    I dont understand what is your real problem. Is it you are unable to rewrite that function as per your need? Clear aayittu parayu koottukaara. I can help you by giving you such a function. Also let me know which will be your greatest number to be converted into words and the name of your...
  8. geekay

    Converting MS Access OLE Object[Image] to BLOB

    Modules & VBA forum was the right place for this posting. That is why it got unanswered till now. You save the image files as binary data in the field of the table. Don't save it as OLE. A procedure to save the .jpg image files contained in a folder named 'FolderForImages' in the working...
  9. geekay

    Apostrophe in field

    Thank you RuralGuy The second will not work as I am assigning the SQL statement to a string variable in a sub procedure. But first I think is OK. Thanks again for the idea
  10. geekay

    Saving xls document from Access on Desktop

    What to do if the OS can be either Win98 or WinXP for different end users ? How to write the code which suits for both the OS ?
  11. geekay

    Apostrophe in field

    I am facing a problem. One of my SQL statemnts is some what like that given below "SELECT TableName.* FROM TableName WHERE TableName.FieldName='" & rs!SchoolName & "'" When the SchoolName contains an apostrophe, error is resulted. Some SchoolNames can not avoid apostrophe character (Like St...
  12. geekay

    SQL result into an Array

    For this you don't want to use an array. The RecordSet itself will serve the purpose of the array. Look into the code below. Dim strSQL As String, FileName As String, i As Long Dim rs As ADODB.Recordset, Cn As ADODB.Connection Set rs = New ADODB.Recordset: Set Cn = New ADODB.Connection Set Cn =...
  13. geekay

    SelLength in DblClick event not working

    Two errors you made in the code One is the absence of the statement Cancel = True Second one; the condition in your if statement is against your requirement. It must be If Not (.Locked) Then ................... Third one is a suggestion. You have included many unwanted lines in the code. To...
  14. geekay

    Blank Picture Display

    First create an image file (NoImage.jpg). Let it have a text "No Image" in a suitable background. Now get the error number if there is no image file. Write code so as to transfer control to the error trap using the line On Error GoTO Err_Form_Current in the start of the procedure Write code...
  15. geekay

    Reference recordset field name with VBA

    Why not rstOrders!Customer
  16. geekay

    IF null THEN

    Dim strSQL As String, MyCount As Long Dim rs As ADODB.Recordset, Cn As ADODB.Connection Set rs = New ADODB.Recordset: Set Cn = New ADODB.Connection Set Cn = CurrentProject.Connection strSQL = "SELECT tablename.* FROM tablename" rs.Open strSQL, Cn, adOpenStatic, adLockReadOnly MyCount =...
  17. geekay

    Line function in reports

    Try to set the picture property of the report with a picture which you design as per your need. Also set the Picture size mode property to stretch if required
  18. geekay

    How to Build expression in a query with multiple lines.

    Never do multiple postings. Say sorry for it before you read my reply in your second posting. If I have seen the multiple postings, I would not have replied.
  19. geekay

    How to Build expression in a query with multiple lines.

    '>>>>>Copy the below code into a module '>>>>>Type Call AddressDisplay and press enter key in the immediate window to see the result. '>>>>>Change the code as per your needs Public Sub AddressDisplay() On Error GoTo Err_AddressDisplay Dim strSQL As String, strAddressBlock As String Dim rs As...
  20. geekay

    Need VBA in a database - but cant think what for

    Dont think that "I want some VBA for the sake of VBA". VBA is needed when you can not do something in the natural way. First you must feel the need for something. You are not feeling this only because you have little imaginations regarding your project. Once you imagine for something and you...
Back
Top Bottom