you have used tab1 layout to set view by using setContentView(R.layout.tab1);
And initize userIdtext2 by using id userIDtextBox from this line EditText userIdtext2= (EditText) findViewById(R.id.userIDtextBox);
Then you take value of userIdtext2 by following code
USER_ID_TMP = userIdtext2.getText().toString();
so check if the id is R.id.userIDtextBox is available in layout R.layout.tab1 or not ?