You could try something like this:
Dim DummyParameters() As String = New String() {
If(tbx_transaction_id.Text = "", Nothing, String.Format("trans_id='{0}'", tbx_transaction_id.Text)),
If(tbx_cust_id.Text = "", Nothing, String.Format("customers.cust_id = '{0}'", tbx_cust_id.Text)),
If(tbx_amount.Text = "", Nothing, String.Format("trans_amount = '{0}'", tbx_amount.Text)),
If(tbx_name.Text = "", Nothing, String.Format("fname='{0}%' or lname='{0}%'", tbx_name.Text))}
Dim finalParameters As IEnumerable(Of String) = DummyParameters.Where(Function(s) Not String.IsNullOrEmpty(s))
Dim query As String = String.Format("select transactions.trans_id,transactions.cust_id,transactions.trans_amount,transactions.trans_date,customers.fname+' '+ customers.lname as customer from transactions inner join customers on transactions.cust_id=customers.cust_id where trans_type='inv' {0}", If(finalParameters.Count > 0, String.Format(" AND {0}", String.Join(" or ", finalParameters)), Nothing))
Debug.WriteLine(query)