Form to Update data in table

D

dhstein

I'm using the form wizard to create a form bound to a table in order to allow
updates to the table. I'm using Allen Browne's excellent routine FindAsUType
- so Allen if you read this - thanks a million - what a great piece of work.
But because of that I'd rather not create a form from scratch, since I'm not
quite sure how I would need to modify the FindAsUType.

question 1 ) It seems that the fields get grouped together in the design
and I can't move them around - for example - move field "A" below field "B".
Am I missing something here?

question 2) I want to put a combo box for one of the fields - to give the
user a choice - can I add that field in the form or am I limited to the
fields that got created when I created the form?

Thanks for any help on this.
 
K

Ken Sheridan

You can modify a form created with the form wizard by switching the
form to design view. To move controls around you can drag and drop
them with the mouse, or by means of the arrow keys on the keyboard.

To add a combo box bound to column (field) in the underlying table you
can add it by dragging from the toolbox. You can turn on the tool
wizard first if you wish to help you, or you can set the combo box's
properties yourself. If the values you went to select from are the
values which will go in the column to which its bound its simple
enough, but if the value of the control will be a numeric foreign key
referencing a numeric (e.g. autonumber) primary key of another table
then you need to set it up so the actual numeric value is hidden and
you see the text values from the other table which correspond to each
numeric value. If for instance you were binding the control to an
EmployeeID foreign key column in a Sales table then it would be set up
like this so you'd see a sorted list of names in the format "John
Brown":

ControlSource: EmployeeID

RowSource: SELECT EmployeeID, FirstName & " " & LastName FROM
Employees ORDER BY LastName, FirstName;

BoundColum: 1
ColumnCount: 2
ColumnWidths: 0cm;8cm

If your units of measurement are imperial rather than metric Access
will automatically convert the last one. The important thing is that
the first dimension is zero to hide the first column and that the
second is at least as wide as the combo box.

Ken Sheridan
Stafford, England
 
D

dhstein

Ken,

Thanks for your reply. I am familiar with using design view and setting
up combo boxes. However, the problem I'm experiencing is that the form was
created with form wizard and is bound to a table. So the controls are
grouped together and I can't separate them. Maybe, I'm doing something wrong.
 
K

Ken Sheridan

The fact that the form has been created with the wizard shouldn't make
any real difference. You should still be able to select and move
individual controls. In the case of labels tied to bound controls
you can grab the label or the bound control by the small black square
at its top left corner to move one independently of the other.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top