Question: ```
 OleDbConn.ole = "SELECT InvoiceDate,InvoiceNo,Customer,SalesPerson,TotalAmount"
 +" FROM Invoice WHERE InvoiceDate BETWEEN "
 + startDate.ToString("yyyy-MM-dd") 
 + " AND " + endDate.ToString("yyyy-MM-dd")
 + " AND (InvoiceNo LIKE '%" + txtSearch.Text 
 + "%' OR SalesPerson LIKE '%"+ txtSearch.Text 
 + "%' OR Customer LIKE '%" + txtSearch.Text + "%') GROUP BY InvoiceNo,InvoiceDate,Customer,SalesPerson,TotalAmount " 
 +"ORDER BY InvoiceDate, InvoiceNo DESC"; //here is my search query

dgw.Rows.Add(
     Convert.ToDateTime(OleDbConn.dr[0]).ToString("MM/dd/yyyy"), 
     OleDbConn.dr[1].ToString(),OleDbConn.dr[2].ToString(),
     OleDbConn.dr[3].ToString(), 
     Strings.FormatNumber(OleDbConn.dr[4]).ToString(), 
     Strings.FormatNumber(OleDbConn.dr[4]).ToString()); //adding data to gridview

```

when a user selects the dates between its supposed to show data in gridview but its not, code works well in sql but its failing in ms-access

Answer: 
First save your input value to some variables using onChangeText 

```
<TextInput
value= {this.state.userName}
onChangeText = {(text)=>{
this.setState({userName:text});
}
 />

```

Then you can pass the value ,

```
<Button 
 onPress={() => navigate('HomePage',{"userName":this.state.userName})} // you can pass objects
  title="Login"
   />

```
```
class Login extends Component {
  constructor(props) {
    super(props);

    this.state = {
      userName:"",
      password:""
    };
  }
  updateUserName = (name) =>{
     this.setState({
      userName:name,
     })
  }
  updatePwd = (pwd) =>{
     this.setState({
      password:pwd,
     })
  }   
  render() {
    const { navigate } = this.props.navigation
    return (
      <View style={{ flex: 1 }}>
        <View style={styles.container}>
          <View style={styles.container1}>
            <TextInput
              style={{ width: 190, color: 'white' }}
              placeholder="User Name"
              placeholderTextColor="#f9f9f9"
              underlineColorAndroid="#f9f9f9"
              onChangeText={(name) => this.updateUserName(name)}
              value={this.state.userName}               
            />
            <TextInput
              placeholder="Password"
              secureTextEntry
              returnKeyType="go"
              ref={input => (this.passwordInput = input)}
              style={{ width: 190, color: 'white' }}
              placeholderTextColor="#f9f9f9"
              underlineColorAndroid="#f9f9f9"
              onChangeText={(pwd) => this.updatePwd(pwd)}
              value={this.state.password}   
            />

            <TouchableOpacity style={{ top: 10 }}>
              <Button
                color="#314561"
                onPress={() => navigate('HomePage',{userName:this.state.userName})}
                title="Login"
              />
            </TouchableOpacity>
          </View>
        </View>
      </View>
    )
  }
}
export default Login

```

file : homePage.js

```
  constructor(props) {
    super(props);
    const { params } = this.props.navigation.state;
    var data = params.userName;     
    this.state = {
      userName : data
    };
  }

```