Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

selsct a field

Discussion in 'Information Technology' started by yousef, Jul 28, 2006.

Tags:
  1. yousef

    yousef
    Expand Collapse
    Guest

    I want to change field name or select other feid
    I have this cod:
    Private Sub Command0_Click()
    Dim dbs As Database
    Dim rst As Recordset
    Dim sql As String
    Set dbs = CurrentDb
    Dim a As Integer
    sql = "select * from Table1 "
    Set rst = dbs.OpenRecordset(sql)
    Dim taj As Integer
    Do While Not rst.EOF
    taj = Nz(rst!Field1)
    rst.Edit
    rst!a1 = taj
    rst.Update
    rst.MoveNext
    Loop
    rst.Close
    End Sub

    taj = Nz(rst!Field1)
    I want to change field name â€taj = Nz(rst!Field1)
    †for example taj = Nz(rst!FieldName)
    Dim a as Integer
    a=1

    If …. Then
    FieldName= “Field†& a+1 rerun field2
    ..
    ..
    ..
    ..=> taj = Nz(rst!FieldName) rerun taj = Nz(rst!Field2)
    ..
     
  2. Loading...


Share This Page