Search:

Type: Posts; User: Phantom1

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Re: Delete both records of a many-to-many relationshp

    I have thought of this: find the ID of the brand to be deleted, find BrandType records having this brand ID, and for each of these records, see if its type ID is found in another BrandType record,...
  2. Delete both records of a many-to-many relationshp

    The many-to-many relationship: tblBrand -< tblBrandType >- tblType

    A brand can sell many types, e.g. Brand ABC sells knives and forks; Brand DEF sells glasses; Brand XYZ sells spoons and forks.
    A...
  3. Re: Which control previously had focus when clicking on another control?

    It is for specific types of controls. There are around 20 controls. They are not a control array. What I need to do is when the user clicks the cancel command button and responds no to the message...
  4. Which control previously had focus when clicking on another control?

    How to know which control previously had focus when clicking on another control, other than by adding code in each control's LostFocus event?
  5. Tell SQL to fetch records even if X and Y fields are empty

    SELECT tblPart.PartNumber, tblBrand.Brand, tblType.Type, tblVehicleBrand.Brand, tblModel.Model
    FROM tblPart, tblBrand, tblType, tblVehicleBrand, tblModel
    WHERE tblPart.Brand = tblBrand.BrandID AND...
  6. Closing delimeter not found for the delimeter at position 7

    Private Sub ReportArchive_Click()
    Dim SQLString As String
    SQLString = "SHAPE {SELECT * FROM tblTransaction APPEND ({SELECT * FROM tblProductTransaction} AS Level2 RELATE TransactionID to...
  7. Re: VB6 - Example on how to make a Login where password is stored hashed in Database

    Can you explain about

    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

    and

    Sleep 200 + 300 * Rnd?

    I only know that it is to prevent brute force password cracking...
  8. Check if a record with a specific ID exists

    I want to check if a record with ID 1 exists.


    rs.Open "SELECT * FROM tblTransaction WHERE TransactionID = 1", DBConn

    There are no records with ID 1. rs.Fields.Count returns 9. How can it?
  9. Re: Copy specific rows of a database to another

    Microsoft Access.
    Yes.
  10. Replies
    6
    Views
    1,345

    Re: Copy a record from one database to another

    There is a problem. The record in tblProductTransaction is a child record of 2 parent records (1 from tblProduct and 1 from tblTransaction), and these 2 parent records are each child records of other...
  11. Copy specific rows of a database to another

    There is a database Database which the VB6 program uses and a database Archive where data from Database will be archived.

    I need to:


    Select records from tblProductTransaction (in Database)...
  12. Replies
    6
    Views
    1,345

    Re: Copy a record from one database to another

    :confused:
  13. Replies
    6
    Views
    1,345

    Copy a record from one database to another

    I have a database called Database which the VB6 program uses. I want to archive specific transaction records, i.e. send them from Database to another database called Archive which is of the same...
  14. Replies
    10
    Views
    797

    Re: Pass a report as parameter to a procedure

    The reference is Microsoft Data Report Designer v6.0? I find 2 references available, MSDBRPT.DLL and MSDBRPTR.DLL. Which is it?
  15. Replies
    10
    Views
    797

    Re: Pass a report as parameter to a procedure

    Start With Full Compile does not give any error.

    I have declared it as Object instead of DataReport. The report shows up correctly. However, when I close it, there is "Type mismatch" error, and...
  16. Re: Displaying selected number of rows in datagrid

    See here how to set the RecordSource of the ADODC programmatically.
  17. Replies
    10
    Views
    797

    Re: Pass a report as parameter to a procedure

    The built-in Data Report of VB6.
  18. Replies
    10
    Views
    797

    Pass a report as parameter to a procedure

    I am trying to pass a report as parameter to a procedure.


    Private Sub Customers_Click
    '...
    Call PopulateReport(rptCustomers)
    End Sub

    Private Sub PopulateReport(rpt As DataReport)
    With rpt
  19. Re: SQL results in repeating data when another table is included

    Thank You :)

    Can You also give an explanation why tblProductTransaction.TransactnID = tblTransaction.TransactnID is also necessary? I thought TransactnID = lblTransactionID.Caption itself would...
  20. [RESOLVED] SQL results in repeating data when another table is included

    "SELECT TransactnID, ProductID, QuantityBought, LineTotal " & _
    "FROM tblProductTransaction " & _
    "WHERE TransactnID = " & CInt(lblTransactionID.Caption)

    The SQL statement is to take the...
  21. Re: SQL does not work with WHERE & ORDER BY

    Thank You for pointing to this article.

    SQL reads the date as mm/dd/yy. The DTPickers' value has to be converted to this format when comparing it with LogDate.

    Now is such a relief.

    ...
  22. Re: SQL does not work with WHERE & ORDER BY

    SQLstring = "SELECT * FROM tblLog WHERE LogDate BETWEEN #" & DTStart & "# AND #" & DTEnd & "#"

    does not fetch any record.

    E.g. DTStart is 17/04/12 and DTEnd is 25/04/12. SQLstring therefore...
  23. Re: SQL does not work with WHERE & ORDER BY

    Yes.
  24. Re: SQL does not work with WHERE & ORDER BY

    There is still data type mismatch. DTStart and DTEnd are of Date data type (IsDate(DTStart) and IsDate(DTEnd), as well as when with .Value, return True). What causes the data type mismatch?
  25. Re: SQL does not work with WHERE & ORDER BY

    I do not copy code. I understand the sample. However, I am confused as to how to make the date comparison work and I am short of time. The deadline for the project is in 4 days and I have to get...
  26. Re: SQL does not work with WHERE & ORDER BY

    SQLString = "SELECT * FROM tblLog WHERE LogDate >= '" & DTStart & "' And LogDate <= '" & DTEnd "'"

    gives Compile error "Expected: end of statement" since an ampersand character is missing: & DTEnd...
  27. Re: SQL does not work with WHERE & ORDER BY

    rsLog.Open "SELECT * FROM tblLog WHERE LogDate >= 'DTStart' And LogDate <= 'DTEnd'", Cnn results in "data type mismatch in criteria expression" and
    rsLog.Open "SELECT * FROM tblLog WHERE LogDate >=...
  28. [RESOLVED] SQL does not work with WHERE & ORDER BY

    rsLog.Open "SELECT * FROM tblLog WHERE LogDate >= " & DTStart & " AND LogDate <= " & DTEnd & " ORDER BY LogDate", Cnn

    The above code is used to open a table tblLog and select all the fields. One...
  29. Re: [RESOLVED] "Subscript out of range" when trying to populate labels in data report

    It is solved. .Sections(4) should be .Sections(1). The name of the section is Section4 and the index is 1.
  30. [RESOLVED] "Subscript out of range" when trying to populate labels in data report

    In the report header (Section 4), there are 3 labels: Label1, Label2 and Label3. The code below is to set their captions.


    With report.Sections(4).Controls
    .Item(1).Caption = FirstCaption
    ...
  31. Re: SQL including the caption of a label

    When rsDetails(1) = lblTransactionID.Caption, the IF construct is entered, but all the records are read, not only the one where rsDetails(1) = lblTransactionID.Caption. The IF condition has no...
  32. [RESOLVED] SQL including the caption of a label

    With rptReceipt
    Set .DataSource = rsDetails 'taking data from tblDetails
    .DataMember = ""
    rsDetails.Requery
    Do While Not rsDetails.EOF
    If rsDetails(1) =...
  33. Re: Cannot backup database because it is open

    Kill results in "Permission denied" error. I have not much investigated in changing the LockType property. From what I have tried as regards to this, I think the Record-locking Information file is...
  34. Re: DESPERATE FOR HELP - Cannot backup database because it is open

    No other forms are open, except the MDIMenu and the backup form. When the function which uses the ADODCs on MDIForm_Load is removed, the backup works. The problem is that the Record-Locking...
  35. [RESOLVED] Cannot backup database because it is open

    Before MDIMenu loads, the Microsoft Access Record-Locking Information file is not there. After the MDIMenu loads, it is there as a number of ADODCs are used in a certain function during MDIForm_Load....
  36. Replies
    4
    Views
    1,465

    Re: Merge 2 fields into 1 as a single recordset

    *bump*
  37. Re: VB6 - Example on how to make a Login where password is stored hashed in Database

    Thank for you for this work. It is useful and helpful. Is there a reason why the field size of the field Password is set to 32? Is it something to do with the MD5 implementation?
  38. Re: ADODC reading incorrect value from database unless when stepping through all the

    How can the field in the database store "0" and the ADODC read "1" from that same field? I will place the procedure call in another event for the moment. Thank you for having tried to help.
  39. Re: ADODC reading incorrect value from database unless when stepping through all the

    If I call CheckForReorder in another form event, it works. I guess the error has something to do with the fact that the recordset is updated just before calling CheckForReorder?
  40. Re: ADODC reading incorrect value from database unless when stepping through all the

    Locally. This is really confusing. The field in the database shows a value, and the ADODC reading that exact field reads another value while the field actually does not have this value.
Results 1 to 40 of 67
Page 1 of 2 1 2



Click Here to Expand Forum to Full Width