INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Hello: I have a 2003 Access databa

Hello: I have a 2003 Access databa

(OP)
Hello: I have a 2003 Access database that I updated to 2013. It contains a form that has a button that opens another form. But for some reason, it will only run once, until I close and reopen the database. The first form is based on a query. Then the button opens another form. Can anyone help with this? It is extremely frustrating and I don't know what else to do.

Private Sub OpenCatDetails_Click()

On Error GoTo Err_OpenCatDetails_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "FrmCat"

stLinkCriteria = "[Pound_Sheet_No]=" & "'" & Me![Pound_Sheet_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Exit_OpenCatDetails_Click:
Exit Sub

Err_OpenCatDetails_Click:
MsgBox Err.Description
Resume Exit_OpenCatDetails_Click

End Sub


Sophia

RE: Hello: I have a 2003 Access databa

perhaps your form is open somewhere in the background
try

CODE -->

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "FrmCat"

stLinkCriteria = "[Pound_Sheet_No]=" & "'" & Me![Pound_Sheet_No] & "'"
DoCmd.Close acForm, stDocName  , acSaveNo
DoCmd.OpenForm stDocName, , , stLinkCriteria 


RE: Hello: I have a 2003 Access databa

(OP)


Hello PWise: That worked great!! Thank you very much for your help!

I just don't understand how it could be open in the background. I checked everywhere part of that code and form over and over, but I guess it doesn't matter now.

Sophia

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close