1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Opening Form to Specific Record Not Working

Discussion in 'Software Development' started by ukmonkeyman, Nov 19, 2011.

Thread Status:
Not open for further replies.
  1. ukmonkeyman

    ukmonkeyman Thread Starter

    Nov 19, 2011
    Basicly I have been given the task of building a system to manage accounts and log calls and I have most of what to do already mapped out and having done similar things in parts with Access before I thought it would be a doddle but a few steps in and I have already come up against a brick wall. I have a form with several search fields and that works fine, no hitches at all and when you click on a button next to the top record it opens the customers details in a new form for editing, that works fine also. The problem I am having occurs when I get more than one result from the search and I try to click the button next to any record except the first and the problem is that the form I want to load is not loading anything, its just a blank form. No text boxes, no labels, nothing but the colours and the picture in the corner. I have put the code on the form to show me what data is going through and when following through with the first record it is showing me the correct data was transfered but when clicking any other record I am getting nothing. I have tried hunting for a solution for this but find it hard to know what to type to get the right information for my problem so I am sorry if this has been resolved before. Also forgive me for my patchy knowledge but I have taught myself everything I have done so far so it is probably just a step I have missed somewhere along the line.

    Any Ideas?

    'In Search Form on button click
        Dim strWhere As String
        If IsNull(Me.OrderRef) Then
            strWhere = "[OrderRef] = " & Me.OrderRef
            DoCmd.OpenForm "fsOpenOrder", WhereCondition:=strWhere
        End If
    'In Order Form on load
        If Me.Status = "Closed" Then
            MsgBox "This order has been closed and you are no longer able to edit any information. If you need to re-open this account then please contact the database admin.", vbInformation, "Closed Order."
            Me.Price.Locked = True
            Me.Items.Locked = True
            Me.Notes.Locked = True
            Me.Dispatched.Locked = True
            Me.DispatchDate.Locked = True
            Me.Status.Enabled = False
            Me.Payment.Locked = True
            Me.PaymentCleared.Locked = True
            Me.ID.Locked = True
            Me.Price.Locked = False
            Me.Items.Locked = False
            Me.Notes.Locked = False
            Me.Dispatched.Locked = False
            Me.DispatchDate.Locked = False
            Me.Status.Enabled = True
            Me.Payment.Locked = False
            Me.PaymentCleared.Locked = False
            Me.ID.Locked = False
        End If
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1027520

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice