User Profile

Collapse

Profile Sidebar

Collapse
fplesco
fplesco
Last Activity: Feb 7 '08, 05:11 AM
Joined: Jul 20 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • fplesco
    replied to Runtime error 424
    Hi QVeen72 -

    I haven't read up on this message when I posted my reply.

    You are right, same thought in here....
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to Runtime error 424
    Hi All -

    I think the PROBLEM here is the WHERE clause of this query. INSERT statement DOES NOT NEED a WHERE clause....

    If you intend to put WHERE clause to avoid duplicate record, then this way is not PERMITTED...

    Search first for the possible duplicate of the record, if yields none, issue an INSERT command...

    Hope this will make sense to you......
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to Runtime error 424
    Hi Towsie -

    As I see your code, it seemed to me that these values you want to insert in T_Sales table is fetched coming from another table and is available in RS recordset.

    If that's really the case.

    add rs! in the field, see below:

    [CODE=vb]
    strSQL = "Insert into t_sales (product, category, customer, origin_of_sale, load_point, vessel, credit_period, sales_terms, shipping_terms,...
    See more | Go to post
    Last edited by debasisdas; Sep 26 '07, 01:47 PM. Reason: Formatted using cide tags

    Leave a comment:


  • Hi -

    Your problem is rsname. It was declared as rsname1. See font emphasized below.

    If Option2.Value = True Then
    rsname1.Close
    Code:
        Set rsname = Nothing
    rsname1.CursorL ocation = adUseClient
    rsname1.Open "select * from MASTER order by [COMPANY NAME],[PRODUCT NAME],[PRODUCT TYPE],[PRODUCT SIZE]"

    Form3.DataGrid1 .DataMember = ""...
    See more | Go to post
    Last edited by debasisdas; Sep 25 '07, 12:31 PM. Reason: Removed too much quote.

    Leave a comment:


  • fplesco
    replied to backup and recovery
    Hey -

    You've missed the filename of the backup file.
    Code:
     fsys.CopyFile "D:\jai\db\milk.mdb", "D:\jai\db\Backup\milk.mdb", True 
    or
     fsys.CopyFile "D:\jai\db\milk.mdb", "D:\jai\db\Backup\milk_backup.mdb", True
    ...
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to accessing a SQL View from VBA
    You may try creating a view without a dot or try using one word VIEW name....
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to Creating sounds in vb6
    Hi Ali -

    Try this

    Code:
        Public sub BeepInVB()
        Dim i As Integer
              For i =1 to 5
                    Beep
              Next i 
        End sub
    ...
    See more | Go to post

    Leave a comment:


  • hi -

    Maybe you can omit the keyword VALUE. See below
    Code:
    Range(AtmosProfile).Cells(1, 3) = 2 * 5
    ...
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to accessing a SQL View from VBA
    Hey -

    For us to get a clearer picture of your problem, you can post part of your code here....
    See more | Go to post

    Leave a comment:


  • Hi -

    What are you trying to do in this code?
    Code:
    rs!empnamee = Trim(Text1.Text)
    I guess, this should be
    Code:
    Text1.Text = Trim(rs!empnamee)
    As per your problem, all you have to do is to search first the record. Then, if you find it, issue a delete command.
    Code:
    con.Execute "Select * from paymentemployacc where empnamee='" & Trim(Text1.Text)
    ...
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to how to delete the records?
    Hey guys -

    What are you trying to do with txtFieldname? It must a textbox object right? Not a field name. Are you trying to pass a FIELD/ COLUMN name into this query?

    It should look like this.

    Code:
    "Delete * from tblTableName Where " & txtFieldname & " like '" & trim(txtDeleteName.Text) & "'"
    Or just a specific fieldname like...
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to Empty a DBF table
    Hi jimwest1995 -

    I had also encountered that problem before. I did some research and some inquiry but I found no answer.

    What I did, as a workaround is after I issue the DELETE command, I called a FOXPRO program that issues "pack" command to the DBF table.

    If you can't get answer from this, maybe you can try this workaround....
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to My Documents - path not found
    Thanks Killer. This info seems to be very useful, even for me.

    Good day!

    Hey Werner -

    I hope this will solve your problem....
    See more | Go to post
    Last edited by Killer42; Aug 17 '07, 10:08 AM. Reason: Shortened quote block

    Leave a comment:


  • fplesco
    replied to Copying Files in VB6
    Hey -

    You can also try it.

    This code will copy a file, and of the same time, will rename a file.

    Code:
    FileCopy "C:\<SourceFolder>SourceFile.txt","C:<DestinationFolder>\DestinationFile.txt"
    ...
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to My Documents - path not found
    Okay. Maybe you should have to define a source and destination folder by yourself.

    For example, wherever your file is located, together with that is a source and destination folder.

    And that way, all you have to do is

    FileCopy App.path & "\<source folder>\Support .xls", App.path & "\<destinat ion folder>\Support 1.xls"...
    See more | Go to post

    Leave a comment:


  • Hey -

    Code:
    Dim Con As Connection
    Dim Rs As Recordset
    
    Public Sub PopulateCombobox()
    Set Con = New Connection
        Con.Open ""              'Connectionstring here
        Set Rs = New Recordset
        Rs.ActiveConnection = Con
        Rs.Open "Select * from EmpTable", Con, adOpenKeyset, adLockOptimistic
        If Rs.EOF Then
            Do Until Rs.EOF
    ...
    See more | Go to post

    Leave a comment:


  • My assumptions are,
    1. You are already connected with the database.
    2. Rs recordset is available at this point.

    All you need is check if there exist at least a record in the recordset Rs

    Code:
    cboCustomerName.Clear
    if not rs.eof then
       do until rs.eof 
            cboCustomerName.addItem Rs!Customer_Name
            rs.movenext
       loop
    end if
    ...
    See more | Go to post

    Leave a comment:


  • fplesco
    replied to My Documents - path not found
    Hi -

    What OS are you using?

    If XP, My Documents is located at

    <D or C>:\Documents and Settings\<Your Windows account name >\My Documents

    to verify the true location of that file. Goto My Documents using Windows Explorer, right-click on the file and then click on Properties. In the File Property pop up dialog, click on General tab and look for its location.

    This...
    See more | Go to post

    Leave a comment:


  • Hi -

    I think you're doing shortcut here. You have to had word application open first.
    wordDoc = GetObject("Word .Application")

    if above code raises an error, you have to code
    wordDoc = CreateObject("W ord.Application ")

    and from here, try to open "sheet.doc"...
    See more | Go to post

    Leave a comment:


  • It's okay Killer. Even superman needs help, sometimes....
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...