I forgot to mention that I call that funtion from my command button. on Click =OpenOSBinForm("22 ")
=OpenOSBinForm("23 ")
=OpenOSBinForm("24 ") and so on.
I'm still new at this, but learning.
Thanks
Hi Golom
Sorry it was a typo on my part.
If I ask for 22A, or 22B or just 22, it does work, but what I would need is to see the full section 22. (22, 22A, 22B ...)
Thanks
Hi PHV
Sorry it toke so long to answer. Here's the code.
Function OpenOSBinForm(strBin As String)
Dim strWhere As String
strWhere = "[Bin] Like " & strBin & "*'"
DoCmd.OpenForm "frmOSBins", acFormDS, , strWhere
End Function
Thanks
Hi all
Does not work.
Here is the code I'm using from dhookom
Function OpenOSBinForm(strBin As String)
Dim strWhere As String
' strWhere = "[Bin]='" & strBin & "'" 'replace with
strWhere = "[Bin]='Like " & strBin & "*'"
DoCmd.OpenForm "frmOSBins", acFormDS, , strWhere...
Hi
Since everything was working so good for my inside storage, I decided to to the same thing for my outside storage area.
Everything was going fine for the piles, but when it came for the Bins its a different story.
My Bins are by section
Ex: 22, 22a, 22b, 22c, 22d...
How do I get the Like...
Hi Duane
You just made my day. I just learn something today. I had no clue about module behind the form.
I did what you said and voila, everything was working on the fisrt tryed.
Thank you so much.
JP
I created a module and enter the code.
The record source of the form frmBin is my query qryBin
On the onClick event of my command button I enter =OpenBinForm("01")
When I run it I get an error message.
The expression OnClick you entered as the event property setting produced the following error...
Hi dhookom
I have a storage wharehouse that I want to click on a botton to see the content of that Bin. What I made was a form and I put a gif picture of the layout of all the location. I created 65 command botton set to transparent so I could see the layout better.
What I wanted to accomplish...
Thanks dhookom
What I wanted to do is to have an sql query to use in all 65 command botton on a gif picture. Its all the same qeries except for the WHERE clause. It change anywhere from 01 to 65. I was hoping not to have 65 queries.
Any advise on where I could go on.
Thanks
JP
I have a command botton which I would like to run a SQL.
Private Sub Command3_Click()
Dim SQL As String
SQL = "select * from inv1 where Bin = '13'"
CurrentDb.Execute (SQL)
End Sub
I keep getting an error on CurrentDB.Execute (SQL) highlite in yellow.
What's wrong with this code? Is something...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.