Opening Form to Specific Record Not Working

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

ukmonkeyman

Thread Starter
Joined
Nov 19, 2011
Messages
17
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?

Code:
'In Search Form on button click
    Dim strWhere As String
    If IsNull(Me.OrderRef) Then
    Else
        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
    Else
        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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top