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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BLUE WATER

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

    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 Commandsaveandp roductentry 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 "AddNewComp any"
    form:

    Private Sub Commandsaveandp roductentry_Cli ck()
    If Len(Me.Company_ Legal_Name & vbNullString) > 0 Then
    Call AddCompanyInfo
    DoCmd.Close acForm, Me.Name

    'DoCmd.OpenForm "Input_Chemical s_Form", xxxxxxxx

    Else
    MsgBox "The Company Name field can not be left blank.", vbCritical, "No
    Company Name Error"
    Me.Company_Lega l_Name.SetFocus
    End If
    End Sub




    ****
    Thanks a million.


Working...