Page 3 of 3 FirstFirst 123
Results 31 to 34 of 34
  1. #31
    PoorCadaver is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    68
    DB SAMPLE 2.0.mdb

    I'm adding a sample of my db. Will you please show me how to do it, 'cause I'm completely stuck

  2. #32
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    This is the code I have for your SEARCH button


    Code:
    Private Sub Kommandoknapp4_Click()
    
        If fActive1 = 1 Then
            Me!frmSearchSub.Form.RecordSource = "SELECT * FROM tblUnit"
            Me.frmSearchSub.Requery
        ElseIf fActive1 = 2 Then
            Me!frmSearchSub.Form.RecordSource = "SELECT * FROM tblUNIT WHERE IsUsed = -1"
            Me.frmSearchSub.Requery
        ElseIf fActive1 = 3 Then
            Me!frmSearchSub.Form.RecordSource = "SELECT * FROM tblUNIT WHERE IsUsed = 0"
            Me.frmSearchSub.Requery
        End If
    
        
    End Sub
    And it seems to work for me though you've got a bunch of broken references when the form first opens.

  3. #33
    PoorCadaver is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Oct 2011
    Posts
    68
    Yeah, but don't you get #Name? in the results?

    Click image for larger version. 

Name:	Pic1.PNG 
Views:	4 
Size:	29.8 KB 
ID:	11945

  4. #34
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    No I don't. Typically that's when you have a reference to a field that doesn't exist or a formula that can't be reconciled. Let's say you have field called firstname but you have a query that's something like firstname: left(firstname,1). Because the alias for the calculated value is the same as a field from your table in some versions of access you'll get the problem you're encountering. I recall, however that your database is pretty simple (the sample you sent) and the code I posted last worked and showed values for everything properly.

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Radio Buttons
    By maguyver in forum Access
    Replies: 3
    Last Post: 07-07-2012, 10:39 AM
  2. Radio Buttons
    By ccordner in forum Forms
    Replies: 1
    Last Post: 01-27-2012, 09:56 AM
  3. Radio Buttons
    By neil123williams in forum Forms
    Replies: 8
    Last Post: 11-11-2011, 03:38 PM
  4. what happened to radio buttons?
    By judomum in forum Forms
    Replies: 1
    Last Post: 10-09-2011, 11:58 AM
  5. radio buttons from 97 to 2010
    By mmm in forum Access
    Replies: 0
    Last Post: 12-03-2010, 04:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums