Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

selection in access

nabilahnabilah Member Posts: 16
i've already have a system that contain all the data about staff in one table.my question is,how if i want to select the data about selected staff from the form?

Comments

  • dokken2dokken2 Member Posts: 532
    : i've already have a system that contain all the data about staff in one table.my question is,how if i want to select the data about selected staff from the form?
    :

    Do you want to restrict the form records to a sub-set of the data?
    If so, you can set a filter for the form or change the form recordset-

    'CHANGE RECORDSET
    Forms!MyForm.RecordSource = "SELECT * FROM Table1 WHERE ([Name]='Smith')"
    Forms!MyForm.Requery
  • nabilahnabilah Member Posts: 16
    : : i've already have a system that contain all the data about staff in one table.my question is,how if i want to select the data about selected staff from the form?
    : :
    :
    : Do you want to restrict the form records to a sub-set of the data?
    : If so, you can set a filter for the form or change the form recordset-
    :
    : 'CHANGE RECORDSET
    : Forms!MyForm.RecordSource = "SELECT * FROM Table1 WHERE ([Name]='Smith')"
    : Forms!MyForm.Requery
    :
    how if i put their name in combo box and just choose from that?do i need to change the recordset for each staff each time i wat to make the selection?
  • dokken2dokken2 Member Posts: 532
    : : : i've already have a system that contain all the data about staff in one table.my question is,how if i want to select the data about selected staff from the form?
    : : :
    : :
    : : Do you want to restrict the form records to a sub-set of the data?
    : : If so, you can set a filter for the form or change the form recordset-
    : :
    : : 'CHANGE RECORDSET
    : : Forms!MyForm.RecordSource = "SELECT * FROM Table1 WHERE ([Name]='Smith')"
    : : Forms!MyForm.Requery
    : :
    : how if i put their name in combo box and just choose from that?do i need to change the recordset for each staff each time i wat to make the selection?
    :

    I'm still not sure of your problem, do you want the combo to select the records shown on that form, or another form?
  • nabilahnabilah Member Posts: 16
    : : : : i've already have a system that contain all the data about staff in one table.my question is,how if i want to select the data about selected staff from the form?
    : : : :
    : : :
    : : : Do you want to restrict the form records to a sub-set of the data?
    : : : If so, you can set a filter for the form or change the form recordset-
    : : :
    : : : 'CHANGE RECORDSET
    : : : Forms!MyForm.RecordSource = "SELECT * FROM Table1 WHERE ([Name]='Smith')"
    : : : Forms!MyForm.Requery
    : : :
    : : how if i put their name in combo box and just choose from that?do i need to change the recordset for each staff each time i wat to make the selection?
    : :
    :
    : I'm still not sure of your problem, do you want the combo to select the records shown on that form, or another form?
    :
    i want the record appear once i select the name chosen from the combo and appear the data in that form.
  • dokken2dokken2 Member Posts: 532
    : : : : : i've already have a system that contain all the data about staff in one table.my question is,how if i want to select the data about selected staff from the form?
    : : : : :
    : : : :
    : : : : Do you want to restrict the form records to a sub-set of the data?
    : : : : If so, you can set a filter for the form or change the form recordset-
    : : : :
    : : : : 'CHANGE RECORDSET
    : : : : Forms!MyForm.RecordSource = "SELECT * FROM Table1 WHERE ([Name]='Smith')"
    : : : : Forms!MyForm.Requery
    : : : :
    : : : how if i put their name in combo box and just choose from that?do i need to change the recordset for each staff each time i wat to make the selection?
    : : :
    : :
    : : I'm still not sure of your problem, do you want the combo to select the records shown on that form, or another form?
    : :
    : i want the record appear once i select the name chosen from the combo and appear the data in that form.
    :

    Adjust the table1/field name to your table-

    Private Sub Combo2_Click()
    Me.RecordSource = "SELECT * FROM Table1 WHERE ([field]='" & Me.Combo2.Text & "')"
    End Sub

Sign In or Register to comment.