Results 1 to 4 of 4

Thread: Access Form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    152

    Exclamation Access Form

    hi all,

    i have two tabls one for Customer and other for Order, Now i have one
    dropdown on form when Display Customer name, when i select CustomerName is show me Related Order for that customer,but problem is when there is no order for customer then it is suppose to show me blank value for that customer's Order but is show me frist records each time i don't know why ...

    pls help me regading this ....

    thanx in advance


    Regards,
    Nilesh Thakur.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    152

    Re: Access Form

    hi all,
    in my form i bind the main from to ordertable as
    Record source = "Orders"
    and i bind the ComboBox to Query as

    i have bind DropDown to customer table with a primary key of CustomerID..And in my form i added textboxes bound to the fields and the combo box for searching the customerID.The combo box is not bound to the table.The record source type should be Table/Query...Use sql statement in the record source of the combo box....

    Example...


    Quote:
    Select Customer.CustomerID, Customer.CustomerName, Customer.CustomerAddress from Customer;



    Then in my combo box named Combo8, attach this code...



    visual basic code:--------------------------------------------------------------------------------Private Sub Combo8_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[CustomerID] = " & Str(Nz(Me![Combo8], 0))
    If Not rs.EOF

    problem is if records is not found in order table then it set cursour to FristRecords..

    pls help me regarding this..

    thanx and regards
    Attached Files Attached Files
    Last edited by nileshhthakur2004; Mar 14th, 2006 at 06:53 AM.
    Nilesh Thakur.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    152

    Re: Access Form

    as i attach the db pls open OrderHeader Form from this DB
    now when i select the CustomerName from Combo Box then it show the related order of that customer, but if order is not place for that customer then it should show me blank record for that customer, but currently it is not show me that ....
    help me regarding this ...

    Any help would be greatly appreciated!

    thanx and Regards,
    Nilesh Thakur.

  4. #4
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: Access Form

    HI,,,


    I have an attached DB that demonstrates simple searching...You may opt to modify it....However, this does not comply certain requirements for projects..However, this idea did help lot of my projects...

    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width