You could use the VeforeUpdate event to modify the value of the calendar to the first day of week (which you set to Sunday. Trial code (ActiveXCtl6 is the Calendar object):
Private Sub ActiveXCtl6_BeforeUpdate(Cancel As Integer)
Dim v
Dim wk As Integer
With ActiveXCtl6
v =...
How about the following code in the current event. I have not test it. Assume you data is sorted by reading date.
private Sub Form_Current()
dim prev, cur
dim rst as Recordset
'cur = xxx value for current reading
set rst=me.Recordsetclone
set rst.bookmark =...
The right reference is the path property of the workbook from which the program is running. This workbook is called ThisWorkbook, probably after the key work "this" in C++. Similarly, in Word, use ThisDocument.
ThisWorkBook.path + "yourfilename.xls"
It took me quit a...
Do you really want change the value only:
with Me.Controls(rptDEA_No)
.SetFocus ' a must in ACCESS
.Text = rst![DEA_No] 'this syntax doesn't work at all
end with
If you use "'Me.Controls(rptDEA_No).ControlSource = rst![DEA_No] 'this syntax doesn't work at all
make sure the...
Try to display all file and dirs of a known directory and debug.print them.
Or, I think the problem may be that this routine is never called. Change it to the double click event or put it in Form inialization method, or the event code of a button.
<CODE>
Private Sub...
kelqc:
Don't know exact mechanism there, but mathematic union does gives only non-repeating elements.
The solution would be to add the primary key field name of the database in both SQLs. This will definite get you all the records. I recommend to include the primary key in all the SQL...
Have not get any suggestion. So I will explain the problem more clearly.
In the Word, a drawing shape (e.g. rectangle) can be filled with a user specific image file. Word let you to keep aspect ratio of the picture if you click the "Lock picture aspect ratio" on the [Fill Effect]...
Though the copy method work, the "template" may worker more transparent. Open the default .xls and save as .xlt. Next time you use menu "File"-"New", the template file show up in the New dialog, click it and open, you will get a new file will all the sheets...
In Office 2002, Application.FileDialog work in all. Use "msoFileDialogFilePicker" to select files to process yourself.
Function GetFilename() As String
With Application.FileDialog(msoFileDialogFilePicker)
.ButtonName = "Save"
.Filters.Clear...
I had this problem several times. ACCESS crash when the startup form opens, so I have no way to access the database.
If you know the form or module which you have made most additions, open a new .mdb and import the change form/module, cut-paste to update your backup. It may same some time.
One cross-software solution using Word compare document feature, not very neat. Select and copy the first workbook to word and save in Word. Select and copy the second to Word. In the 2nd Word document, run menu "Tool"-"Compare Document" to compare to the first Word file...
There is no shorter way. You can change the LEFT with length calculation to improve:
=LEFT(B2,len(B2)-4)&"/"&MID(B2,2,2)&"/"&MID(B2,4,2)&" "&LEFT(A2,len(A2)-2)&":"&MID(A2,2,2)
The above is not true date-time calculation, just string manipulation.
Here is a easy solution if by "numbers" you mean [0..9] not including "."
function Delete0to9(byval s as string) as string
dim i as integer
for i = 0 to 9
s=replace(s, cstr(i),"")
next i
Delete0to8 = s
end function
I think Replace function...
The problem lies in the SELECT statement add predicate ALL will solve your problem:
SQL1 = "Select ALL sample.job_no from sample where ..
For more information check the syntax at:
http://www.asp-help.com/database/db_sql_stmt.asp#SELECT
To copy rows or columns, select by click and drag (or <Shift>+arrow_key) on the left header column (the grayed numbers, 1,2,...) or the header row. The entire rows/columns are selected. Go to target sheet, select a cell on the 1st column/row and press <Ctrl>-V (or paste special with width or...
I belive you can not preserving row height (unless you are copying entire rows) or column width (unless they are entire columns). All other properties can be copied over.
You may have the directory misspelled. Try Dir("...\*.*), you should at least get "." and ".." directories if the directory exists.
The files could be *.htm, then use "C:....*.htm*.
An argument could be added to the Dir as: Dir("C:\Documents and...
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.