G'day,
As ever, there are many ways to skin a cat but one simple option could be:
dim intRecordCount as integer
intRecordCount=DCount("*","qryResults")
if intRecordCount>0
Me.TabCtl4.Pages(3).Visible = True
Else
Me.TabCtl4.Pages(3).Visible = False
end if
Good luck! JB
Hey Darren,
Just encountered this same problem myself. My database happens to be Acc2003 but I reckon this could be adapted for other versions.
I opened my db and then went Tools, Database Utilities, convert database, convert to Access 97. Saved as db_97.mdb and then upgraded that back up...
Thanks PHV! I didn't know that, is it true of every version of Access? I'm sure I used to need it and these habits stick. But then, so does sh!t......!
Cheers for the heads up mate, will remove my redundant lines on Monday.
JB
G'day,
And add line as below to requery the list....
...
Me.lstBox.RowSource = strSearch
me!lstbox.requery
Maybe consider the Afterupdate event, (or even an invisible button with Default set to true) rather than on change so that the code only runs once the user has typed something and...
G'day Ali
I've assumed your control are called txtIn and txtOut:
Private Sub BtnRndTo500_Click()
Dim intResult As Integer
intResult = CInt(Me!txtIn / 500)
Me!txtOut = intResult * 500
End Sub
Hope that helps, works perfectly with your examples.
JB
jade,
strTrimmed = Right(strFullPath, InStrRev(strFullPath, "\") + 1)
you can use [ code ] and [ / code ] without spaces to put your code in blocks for readability ;)
JB
Hi,
Take out error handling for now and post which line is producing the type mismatch error pls mate
3. This was just highlighting Allens own example, showing that the function is designed to have an optional criteria field. We merely adapted that to have your search criteria rather than...
G'day ddevil,
stSchedDate = DateAdd("d",1-Day([stSchedDate ]),DateAdd("m",-1,[stSchedDate ]))
will set stSchedDate to the 1st of the previous month. Also will work over 08/09 boundaries which could be a drama with your month() plan...
Good luck!
JB
G'day,
Allen brown gives an example you could use:
To limit the results to zip files:
Call ListFiles("C:\Data", "*.zip")
So, you can adapt this to:
Call ListFiles(MyPath,"*" & Format(Me!Numero, "0000000") & "*.doc")
This would be the same as typing "*0022038*.doc" into a windows...
G'day pjd,
This should really be in the Access Reports forum are but I've no idea how to request it to be moved! The code below could be a starting point for you. Create 10 captions of "doesn't matter" on a report named txtCaption1, txtCaption2, ..., txtCaption10
Private Sub...
g'day SK,
If it's enhancing historical data perhaps suggest they produce a regular export file for your app which can then remain independant?
take it easy dude,
JB
G'day keri,
Add this under your code or in a module and you should be golden
Function IsLoaded(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view or Datasheet view.
Const conObjStateClosed = 0
Const conDesignView = 0
If...
G'day Greg,
Compact and repair and let us know if it improves. All access mdb files swell, but sometimes this is accelerated by certain practises such as dropping a table and recreating it on the fly.
Alternate, do you have a back up of the db from a few months ago? If so, how does it fair...
I had left one more tiny error in. The variable strOrder is declared twice in the function:
function MakeSQL(strOrder as string) as string
Dim strSQL As String, strOrder As String, strWhere As String
so I declare strOrder as a passed variable and then go on to Dim it. So, please change...
PHV has most likely hit the nail on the head there. Another silly mistake from me posting without testing, and so obvious if i'd tested it first. My apologies Gel, my thanks PHV.
On the plus side, you've hopefully got a solution 9.5 hours before I would have noticed that silly error!
I'm...
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.