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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Continuous Forms Help

Status
Not open for further replies.

glavster

Technical User
Mar 30, 2007
48
IE
Hello everyone. I need some help with forms. I have a Continuous Form with 4 Combo boxes in the Header. I need Data Entry set to YES. And I need the values chosen in the combo boxes in the Header to be entered into the table INVOICES for all new entries of the Continuous Form. And no other older details in the table edited. And I only want to choose the Combo box entries once as it will be the same combo box values for all new entries in the Continuous Form.

Can anyone please please help with this.

THANKS
 
And what have you tried so far ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
OK First thing I tried is this. I have 4 combo boxesbut lets just work on 1. I put a hidden text box called OCIDH in the details section of the form and bound it to the correct field in the table, called OurCompanyID. The the combo box in the header called zOurCompanyID is unbound. In the combo box After Update I put Private Sub zOurCompanyID_AfterUpdate()

Me.OCIDH = Me.zOurCompanyID

End Sub

But this method only transfered the combo box value to first OCIDH in the continuous form.

 
And what about this ?
Me.OCIDH.DefaultValue = Me.zOurCompanyID

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
The second thing I tryed was to put this in the After Update section of the Combo box.

Private Sub zOurCompanyID_AfterUpdate()

Dim db As DAO.Database, sSQL As String

Set db = CurrentDb
DoCmd.SetWarnings False

sSQL = "UPDATE Invoice SET OurCompanyID = " & Me.zOurCompanyID & " ;"
db.Execute sSQL
DoCmd.SetWarnings True

End Sub

But this not working with Data Entry set to YES.
 
OK I tried that and it works a treat so far. Thanks a mill.
I'll run a few tests on the app and see if all is ok.
Thanks for all your help.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top