Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to input new orders for old projects:

Status
Not open for further replies.

kcmorrissey

Technical User
Apr 14, 2005
15
0
0
GB
I have an orders form that looks up data from 3 tables (projects, orders and orderDetail) with a subform that looks up data from a query.
The form has several unbound comboboxes relating to the project that synchronise with VBA code
Projects are setup in another form and this form is only used to lookup or add orders to existing projects, so project data will remain the same on the form

At the moment when I press the 'add new order' button, it does not clear the unbound combo boxes and all the data in bound fields and subform is cleared.
When I press the 'Add new Order' button I want the form to clear all the data on the form and subform relating to the order_table, but to retain, or automatically update(with the same data), the data in the fields relating to the project table.

How do I make this work?

Any help is greatfully recieved.

Thx.
Kev.
 
If I understand correct you want to clear unbound comboboxes when you are at the new record
You can do it two different way.
Code:
Private Sub cmdAddNewClick()
        Me.MyComboBox = ""
End Sub
Code:
Private Sub Form_Current()
    If Me.NewRecord Then
        Me.MyComboBox = ""
    End If
End Sub


________________________________________
Zameer Abdulla
Visit Me
The best thing to spend on your child is your time.
 
Thanks Zameer,

My sever is down this morning, so I can't try this yet, but looks like it would work. However the main problem is trying to keep the project data in the form fields that relate to the project and not the order record.

I can see this working two way:
1 retain all for project and clear data for orders
2 clear all fields and automatically repopulate project fields.

But I can't find out how to do this. My docs and help files don't cover this!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top