AN1554's Profile User Rating: -----

Reputation: 7 Worker
Group:
Active Members
Active Posts:
130 (0.12 per day)
Joined:
03-April 11
Profile Views:
1,641
Last Active:
User is offline Private
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   AN1554 has not set their status

Posts I've Made

  1. In Topic: Which control previously had focus when clicking on another control?

    Posted 5 May 2012

    There are around 20 input boxes. 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 box, reset focus in the control which had focus just before clicking cancel. How to do this other than by adding code in each of the controls' LostFocus event?
  2. In Topic: Closing delimeter not found for the delimeter at position 7

    Posted 29 Apr 2012

    I found the solution.

    On Error Resume Next
    If Len(rsTransaction!FullName) = 0 Then 'returns greater than 0 if field exists (therefore goes to Else part); if field does not exist, will result in error & resume next
        .Item("txtCustomerName").DataField = "CustomrID" 'set DataField to any existing field
        .Item("txtcustomername").Visible = False 'hide textbox since it will not be needed
    Else
       .Item("txtCustomerName").DataField = "FullName"
    End If
    
  3. In Topic: Closing delimeter not found for the delimeter at position 7

    Posted 29 Apr 2012

    I found it. A "}" was missing at the end of the first SELECT, before APPEND. Now, there is another problem.

    There is the error DataField'FullName' not found.

    rptTransaction.Sections(3).Controls.Item("txtCustomerName").DataField = "FullName"
    


    When the SQL is "SHAPE {SELECT * FROM tblTransaction, tblCustomer WHERE CustomrID = CustomerID} APPEND ({SELECT * FROM tblProductTransaction} AS Level2 RELATE TransactionID to TransactnID)", it works.

    The error is generated when the SQL is "SHAPE {SELECT * FROM tblTransaction APPEND} ({SELECT * FROM tblProductTransaction} AS Level2 RELATE TransactionID to TransactnID)", since there is no field named as "FullName" that is fetched.

    How do I check if the field "FullName" exists in the recordset?
  4. In Topic: Overheads - IF this then do that, or directly do that?

    Posted 28 Apr 2012

    The question is whether IF adds to overheads.
  5. In Topic: Check if a record with a specific ID exists in a table

    Posted 28 Apr 2012

    I did not think about COUNT. rs.Fields.Count returns the number of fields, not the number of records fetched by the recordset, which rs(0) returns.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

Comments

AN1554 has no profile comments yet. Why not say hello?