i have 2 tables:
Employee:
ID
SalaryPerDay
Name (unique)
.....
.....
Schedule:
ID
EmployeeID
Date
Attending (boolean)
loan
discount
overTimeHours
and a query
EmployeeNameQuery: that return all employees names
i create a datasheet contains
column 1: employees names (EmployeeNameQuery)
column 2: Date (Schedule)
column 3: Attening (Schedule)
column 1: OverTimeHours (Schedule)
column 4: Loan (Schedule)
column 5: Discount (Schedule)
this data sheet display rows as employees names count
Questions:
1- Decimal number display as (280) how can i display them as (280.00) i can insert decimal number but i display values with .00 without .00
2- How to create form that contain data from 2 tables and save data to one table,
when i fill all datasheet with attending i want to submit these information to Schedule Table with each field with related one in the table and insert EmployeeID of selected employeeName.
In regard to both one and two, it seems that you have not bound your form to a table or query. Datasheets and continuous forms only work properly if all the data-entry controls are bound to fields. It is nearly always best to use a continuous form rather than a datasheet. If you are not familiar with form design, it is nearly always best to use the wizards, because they will set up the form with all the bindings in place.
For currency, choose the currency data type, not decimal - this is important for more than display. In addition, fields have a format property that can be set in table design.
I suggest you do some reading if you intend to continue to work in Access. You will find lists of books here on Stackoverflow - The Access Cookbook Getz, Litwin and Baron is often recommended.
来源:https://stackoverflow.com/questions/7631545/how-to-create-form-that-contain-data-from-2-tables-and-save-data-to-one-table