If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Limiting Field Choices based on input in another Field
I have two fields in a table called Chart and Account Group. How do I limit
the selections available in the Account Group field based on what a user keys into the Chart field? |
#2
|
|||
|
|||
Limiting Field Choices based on input in another Field
Hi Chart Builder,
you could use a combo for the chart field. Build the row source as a sql string with a where clause based on what the user enters for Account group. Something like this Dim strSQL as String If Not IsNull(Me.AccountGroup) Then strSQL = "SELECT yadda, yadda " _ & "FROM TableName " _ & "WHERE AccountGroup = """ & Me.AccountGroup & """" Debug.Pring strSQL Me.Chart.RowSource = strSQL End If Note: the above assumes that AccountGroup is a text field. Replace the table, control and field names with the appropriate names. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Chart Builder" Chart wrote in message ... I have two fields in a table called Chart and Account Group. How do I limit the selections available in the Account Group field based on what a user keys into the Chart field? |
Thread Tools | |
Display Modes | |
|
|