create function from two table
Create a union query by using two tables. 1  On the Create tab, in the Other group, click Query Design. 2  In the Show Table dialog box, click Close. 3  On the Design tab, in the Query Type group, click Union.  In SQL view, type SELECT, followed by a list of the fields from the first of the tables you want in the query.