Before I kill someone..

Hielkjen

New member
Local time
Today, 08:56
Joined
Nov 20, 2012
Messages
7
Hello all you access pro's!
Soooo.. I decided to make a little simple database starting from the contacts template.
So I did everything... put in allllll my data...
changed the fields names and now nothing seem to work anymore, even this <edited> search button! And this probably where it went wrong..

I have no experience with access....
Dont even start "leave it up to the programmers" im way to pissed off not to finish this!! I have been sitting in my Pj's for the last 8 hours trying to make A STUPID Search button work.

Please help me...
Even if I have to send the complete file to someone to fix it.
Please in baby language.

Sincerly an overstressed girl about to kill someone..
 
Last edited by a moderator:
changed the fields names and now nothing seem to work anymore, even this shit search button! And this probably where it went wrong..

Can you try putting the field names back to how they were before to see if that fixes the issue?

What field names did you change, the labels or the actual controls?

If you can give any more detail on the issue it will be a lot easier to help out.
 
well...... I started over 5x times and it is whenever I mess with the field button!
I think. God I have no idea, it looks how it should look, it just doesnt work as it should.
 

Attachments

  • access1.jpg
    access1.jpg
    107.1 KB · Views: 105
Do you see at the top where it says "Certain content has been disabled"? Click options and tell it to enable the content and see if it works then.

Also, which field button are you referring to?
 
yup i did and now i get a new error. Please find included the database and the mess I made. Because I can t seem to figure it out!
All I want is to have a horse database, as you can see and search for it. And then to click open, have a picture and more info!
Do you know what I mean? I am sorry for my "friendly" behaviour but... Im doing it absolutely wrong and lost track with what i did more wrong!
 

Attachments

Last edited by a moderator:
May be good to get another set of eyes on this. The main thing I see that could be causing the issue is the "Open" field. It is not populating like the original template.

I'm running low on time to look further but the macros all look identical with the proper replacements for form names.

The query that the original template is based on is quite different than your query and your forms are not based on your new query so that may be something that throws it off as well. I've uploaded the original Contacts template for those of you who wish to tackle this one. Sorry I couldn't be more help.
 

Attachments

Thank you for your time anyway...
Like I said.. I renamed it all.. and it shouldve been working and then I was playing around but dont ask me what I did......
 
Okay, your problem is that you put code in the form module of the Horse List form but it isn't inside a procedure (either Sub or Function).

This is the code that should be in either a Sub or Function:
Code:
'Create a string (text) variable
    Dim vSearchString As String
'Populate the string variable with the text entered in the Text Box SearchFor
    vSearchString = searchfor.Text
'Pass the value contained in the string variable to the hidden text box SrchText,
'that is used as the sear4ch criteria for the Query QRY_SearchAll
    SrchText.Value = vSearchString
'Requery the List Box to show the latest results for the text entered in Text Box SearchFor
    Me.SearchResults.Requery

'Tests for a trailing space and exits the sub routine at this point
'so as to preserve the trailing space, which would be lost if focus was shifted from Text Box SearchFor
    If Len(Me.SrchText) <> 0 And InStr(Len(SrchText), SrchText, " ", vbTextCompare) Then
        'Set the focus on the first item in the list box
            Me.SearchResults = Me.SearchResults.ItemData(1)
            Me.SearchResults.SetFocus
        'Requery the form to refresh the content of any unbound text box that might be feeding off the record source of  the List Box
            DoCmd.Requery
        'Returns the cursor to the the end of the text in Text Box SearchFor,
        'and restores trailing space lost when focus is shifted to the list box
            Me.searchfor = vSearchString
            Me.searchfor.SetFocus
            Me.searchfor.SelStart = Me.searchfor.SelLength
            
        Exit Sub
    End If
'Set the focus on the first item in the list box
    Me.SearchResults = Me.SearchResults.ItemData(1)
    Me.SearchResults.SetFocus
'Requery the form to refresh the content of any unbound text box that might be feeding off the record source of  the List Box
    DoCmd.Requery
'Returns the cursor to the the end of the text in Text Box SearchFor
    Me.searchfor.SetFocus
    If Not IsNull(Len(Me.searchfor)) Then
        Me.searchfor.SelStart = Len(Me.searchfor)
    End If

So, not sure if you need that code or not but it would appear that you don't. So, cut that out and then the form works just fine, including the OPEN link.
 
Right... And may I ask how I do that? :)
especially where? (babylanguage :) )
because before i was playing with the codes it didnt work, thats why i started pasting them in from forum's I found... Did you make it work for yourself??
Thank you very much already?
 
Right... And may I ask how I do that? :)
especially where? (babylanguage :) )
because before i was playing with the codes it didnt work, thats why i started pasting them in from forum's I found... Did you make it work for yourself??
Thank you very much already?

1. From the Ribbon, click on DATABASE TOOLS at the top and then select VISUAL BASIC which is at the far left of the Ribbon after you click Database Tools.

2. The VBA Window will open up.

3. On the far left-hand side you should see a tree view which starts with CONTACTS >
Microsoft Office Access Class Objects >
Form_Horse details
Form_Horse list

4. Right Click on Form_Horse list and select VIEW CODE.

5. Click CTRL + A to select all.

6. Click DELETE

7. SAVE

SCREENSHOT:

attachment.php
 

Attachments

  • hielkjen01.png
    hielkjen01.png
    86.2 KB · Views: 345
Thanks Bob, I had to go to a meeting. I noticed a few things that were probably not needed for her application or that needed to be changed (like the record source query) but were there in the original template but did not see that part.
 
Thank you!!
I deleted that but now if I want to search i get asked for parametervalues..
Last name, first name, emailaddress... etc. Also when i open horse details, and i want to use "the go to" it shows only 2 rows. while I need the horsename row.
a little bit more help? :)
 

Users who are viewing this thread

Back
Top Bottom