By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

My Code has Problems: Opening specific records in a form based on closed form ?

P: n/a
Allen, or others,

In my tables there is a unique key that identifies each new company record
with a number, this
variable is Company_ID as has been typed up in the edit table data view.
Thus I think you are referring to this unique new identification number that
is created from my
AddNewCompany form, thus that can be used to open the new form after
pressing the button
(known as the Commandsaveandproductentry button). The new form is called
Input_Chemicals_Form as viewed from the Access2002 forms list.

Therefore what exactly do I need to fill in the "xxxxxxx" with ? please let
me know exactly to the
letter so I don't get bugs again, I must be missing something. I will
remove the ' in the original
VBA code.

Here is my code for the button that is pressed section in my "AddNewCompany"

Private Sub Commandsaveandproductentry_Click()
If Len(Me.Company_Legal_Name & vbNullString) > 0 Then
Call AddCompanyInfo
DoCmd.Close acForm, Me.Name

'DoCmd.OpenForm "Input_Chemicals_Form", xxxxxxxx

MsgBox "The Company Name field can not be left blank.", vbCritical, "No
Company Name Error"
End If
End Sub

Thanks a million.
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.