Page 1 of 2 12 LastLast
Results 1 to 15 of 25

Thread: Messages

  1. #1
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12

    Exclamation Unanswered: Messages

    I have database, with a "switchboard" front screen, one of the buttons leading to a search function, with the normal text entry box saying "OK" or "Cancel". When you press cancel it brings up a big convaluted text box, which is ok for me not not for colleagues of mine.
    Is there any way I could make it so that when cancel is clicked it brings up my own custom text box, or just closes the box and returns to the main screen?

    Thanks in advance
    Last edited by foxyfaerie; 12-01-04 at 12:44.

  2. #2
    Join Date
    Nov 2004
    Posts
    10
    I'm a little confused how you are launching this "normal text entry box". What's triggering this? Do you have any code you can show us?

    Second, can I get more detail on what this "convoluted text box" looks like?

  3. #3
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12
    I have a switchboard/front screen (whatever you want to call it) with three command buttons, clicking the top one takes the user to the data antry screen, clicking the second one opens the query and clicking the third one closes the database and saves.

    It's the second button i use to launch the query, and the convaluted box used to say something (which im sure you've seen at some point) but now says it can't follow the hyperlink, even though its in the same place its always been.

    The code is: -
    SELECT[TBLHOUSEHOLDWASTE].Search,[TBLHOUSEHOLDWASTE].COMMENT,


    Private Sub Command11_Click()
    On Error GoTo Err_Command11_Click


    Screen.PreviousControl.SetFocus
    DoCmd.FindNext

    Exit_Command11_Click:
    Exit Sub

    Err_Command11_Click:
    MsgBox Err.Description
    Resume Exit_Command11_Click

    End Sub

    Private Sub Command7_Click()

    End Sub

  4. #4
    Join Date
    Nov 2004
    Posts
    10
    Had a bit of an accident with the last post. Sorry if this is reposted.


    Ok. If you pasted the code to your form exactly as it showed in your post, you will need to remove the following line:

    "SELECT[TBLHOUSEHOLDWASTE].Search,[TBLHOUSEHOLDWASTE].COMMENT,"

    It is clear that it does not belong and had been mistakenly pasted in.

    Secondly, I am not sure which of your buttons you have named "command11". If you need to check the name, go to your form design, right click the button, select properties. The name should appear at the top of the properties dialog. For explicit confirmation, click the "other" tab and look at the "name" field (the tabs shoud read format, data, event, other,all.

    Finally, I need you to check something for me. Go to the property dialog for the button you are having trouble with (as above). Click the events tab. What events are defined (have entries)? And what do they read? I'm particularly interested in OnClick.

  5. #5
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12
    the button im having "problems" with has on events on it, to be honest Im not too good with databases so I used buttons to follow hyperlinks within my database (it this button follws the hyperlink to the query)
    as for my command11, thats actually my last "button" which i use as a text box-come-in-joke (yes, im strange - its best not to ask!!)

  6. #6
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    So does the button just open the query? as you would do if you double clicked on it in the db window, or does it go to a form which displays your query,
    whats your query called and whats the name of the button we are dealing with (go to the property window and click on your button then on the all tab the property is called name)

    Dave
    and yes i do know where cumbria is

  7. #7
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12
    yes, you know the text box where you type in what you're looking for (eg blue socks!) and then you get your results?
    my query is called QryCommentsAll (I'm searching for comments members of the public have made) and we are dealing with button "Command7"

    how do you know where Cumbria is??!
    Last edited by foxyfaerie; 12-02-04 at 07:51. Reason: 'Cos I can't spell!!
    foxyfaerie

  8. #8
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12
    would it help if i posted it up here?
    foxyfaerie

  9. #9
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    its ok i think i know what you want

    go to your button command7 and delete out the hyperlink on the on click event
    click the ... button choose code option and paste this code into the command button sub that appears

    Code:
    Private Sub Command7_Click()
        DoCmd.SetWarnings False
        On Error Resume Next
        DoCmd.OpenQuery "QryCommentsAll"
        If Err.Number <> 0 Then
            MsgBox "You Need to type in a value"
        End If
        On Error GoTo 0
    End Sub
    This should be what you want

    Dave

    and this should be Cumbria

  10. #10
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12
    indeed it is cumbria. dont actually have time to try that *right now* but ill give it a go when i get a chance.

    ta!
    foxyfaerie

  11. #11
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12
    I give up! it didnt work! i guessits not importan really, i just keep on getting delusions of how good i really am with stuff like this!! lol oh well!!!!!
    foxyfaerie

  12. #12
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12
    I give up! it didnt work! i guess its not importan really, i just keep on getting delusions of how good i really am with stuff like this!! lol oh well!!!!!
    foxyfaerie

  13. #13
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    What went wrong?, i tested this before i gave it to you and it ran fine,
    I will sort it for you of yiu want me to but i need some info abt what went wrong etc. did you get an error message etc.

  14. #14
    Join Date
    Dec 2004
    Location
    England, in a little place called Cumbria (I bet no-one's heard of it!!)
    Posts
    12
    yeah, it just said the code was wrong (i copied and pasted it).
    its attached if you want a closer look?
    Attached Files Attached Files
    foxyfaerie

  15. #15
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Ahh i cant actually open zip files
    did you get a debug window up which line did it stop on?,
    is the code in the form module window or just in a module,
    Does the actual code look like this

    Private sub yaddah()
    Private Sub somethingelse()
    if this last bit is true delete out the 2nd line and one of the End Sub's at the end

    Dave

Posting Permissions

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