Thanks both. I was sure there had to be something like vba.Date and I do like the Now technique. For the moment though I've fixed it with a call to a new MyDate() function in a separate file.
Hateful project. It was written by a user (long since left) using switchboards and wizards. Any field...
I want to call the Date function to put today's date in a field:
Me.txtDate.Value = Date
Easy enough except that there's a field named "Date" and this line of code gets that value rather than calling the Date() function. If I type Date() then Access autocorrects it and removes the brackets...
I'm just rewriting my oldest app - a Fox DOS system dating from the early 90's. It's a three-user production-control system for a small factory and they'd like it to run for the next 15 years so I'm using Access.
Geoff Franklin
www.alvechurchdata.co.uk
Just to add to Mike's thoughts, are you connecting to data on a server and has anything changed on the network recently?
Geoff
Geoff Franklin
www.alvechurchdata.co.uk
I'd agree that it sounds like the result of user action rather than corruption. Corruption normally trashes everything - I've not seen it neatly take some records and leave the rest untouched.
Geoff Franklin
www.alvechurchdata.co.uk
The File System Object has all the features you need for this task. Examples at http://msdn.microsoft.com/en-us/library/z9ty6h50%28v=vs.85%29.aspx.
The only possible snag is that some administrators disable the FSO because it's a security risk.
Geoff Franklin
www.alvechurchdata.co.uk
The Controls collection can accept a string as an index:
Me.Controls("Tab01")
so you should be able to use your concatenated values
controlName = "Tab" & strIX
Me.Controls(controlName).Form.Filter = "PageName"
Geoff Franklin
www.alvechurchdata.co.uk
It's dangerous to experiment with a Delete query so start by developing a standard Select query. Also make a backup of the data before going any further.
If you want to select all dealers before 2010 then put <=#01/01/2010# in the criteria row of the DATE_Time column in the query. Run that...
Depends whether you want to print the form, print the current record, or print a report. Either way, the Command Button Wizard is a good starting point. It will give you a samples of the commands that you might need to use.
Geoff Franklin
www.alvechurchdata.co.uk
I'd suggest that you import the entire text file and then use queries to break it up. It's much easier to manipulate data once it's inside Access.
Geoff Franklin
www.alvechurchdata.co.uk
If it's network speed that's the problem then genomen's advice sounds good. Get as much processing as you can moved to T-SQL on the back end so that there's less traffic on the network. It's much better to have SQL Server send ten records to the frontend than it is to download a million records...
All I'd add to Mike's advice is that you've got to have Access installed in order to go the Automation route. You're also likely to hit minor problems when the user upgrades Access.
I'm fairly sure that the ODBC technique will work on the mdb file without Access being installed. Can't test that...
If you go to Access Options then you can set the default database format to Access 2000, 2002/2003 or 2007 which makes life very easy if you're moving back and forth between different versions.
Geoff Franklin
www.alvechurchdata.co.uk
Your example looks like they might be Epson control codes - double-strike was ESC+G which agrees with your
CHR(27)+G for bold. I'm afraid I've chucked all my Epson manuals but the codes will be on the web somewhere.
Geoff Franklin
www.alvechurchdata.co.uk
Set its TripleState property to True and put something like this in its click method:
Private Sub togTest_Click()
Select Case togTest.Value
Case -1
togTest.Caption = "On"
Case 0
togTest.Caption = "Off"
Case Else
togTest.Caption =...
I was in a similar situation some years back and I used the money to get Microsoft Certified in Visual Basic. In the end I didn't move to a VB job but the certification seemed to impress the folk at interview.
If you've got practical experience in SQL Server then I'd say go for the MS...
Simple (once you know how ...)
1. Add a label to the form.
2. Cut the label from the form.
3. Select the text box.
4. Paste the label onto the textbox.
Geoff Franklin
www.alvechurchdata.co.uk
I can't find my code but I did something like this last time:
n = 0
Do While datStart < datEnd
if Weekday(datStart) = 7 or Weekday(datStart) = 1 then
'-- Do nothing - it's a weekend
else
'-- Add logic here to handle other holidays
n = n + 1
end if
datStart = datStart...
I'd agree with Duane about wondering whether you really need 14 different queries but if you're stuck with that data design then take a look at the OpenArgs property of the form. If you specify OpenArgs when you call the form:
DoCmd.OpenForm FormName:="myForm", OpenArgs:="Query1"
then you can...
I agree that the > looks wrong and I'd expect to be looking for the four quarterly totals. It depends what the original spec asked for, the users might be wanting totals for the last 3, last 6, last 9 and last 12 months.
Geoff Franklin
www.alvechurchdata.co.uk
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.