...Example:
dim rst as dao.recordset
Set rst = currentdb.openrecordset("tblAttachedFiles")
do until rst.eof
Select Case rst!Filename
Case "*.doc"
Word doc printing instructions
Case "*.xls"
Excel doc printing instructions
Case "*.pdf"
PDF printing...
Does anyone know code that will work to print out a series of non-access files, regardless of what type they are?
I have a table structure where people can "attach" various documents to their record. Really the table just stores the directory of the file they've attached. I would like to run...
Thanks - that worked. Now I need to go and change my VB code which constantly updated that SQL as a series of variables to instead change a querydef.
Strange problem, but your solution worked great. Thanks!!!
Very strange problem...
I noticed that one of my listboxes is missing some records, and so I checked its underlying query (which is assigned through the listbox.rowsource VB property) to find the problem. The strange thing is that the missing records ARE present in the underlying query results...
Also I wanted to add that even if had seen this cool concatentate function, I probably wouldn't have thought to put it in a crosstab to accomplish what I needed to do. The crosstab and conc. function work great together. I learned a lot from this exercise.
The query field:
OptionNames...
Thank you both for your suggestions!
Duane - you are brilliant and you saved my butt.
I ended up using your concatenate function (the one that separates "records" with a line break within the field)with the crosstab and it works great.
Your function ended up being:
Function...
...actually is a new record and so it goes on a new line.
My data ends up looking like this:
Structural Bay Windows Garage
*********************************************************
Sunroom
Side Entry
Loft...
...& "') AND ([expected close] between date()-395 and date())"
Set tdfOpp = tdfOpp.OpenRecordset
DoCmd.SetWarnings (False)
DoCmd.RunSQL ("delete * from chttblsales")
DoCmd.SetWarnings (True)
Do Until tdfOpp.EOF
tdf.AddNew
tdf!Date = tdfOpp![expected close]
tdf!GP = tdfOpp![gross...
I have a line graph that charts Gross Profit $ earned each month. In some months, there was no GP reported, so technically the value would be "$0". But since nothing was entered for the $0 months, the value is just skipped over in the chart.
My data is like the following example:
DATE...
...to change has a prefix 'cond' & and a suffix that is the text of 'Me.ActiveControl.Tag'". I just can't find the right syntax. Here is my code:
***********************************
ButtonTag = Me.ActiveControl.Tag
sqlCond = "AND (qSearchCust." & ButtonTag & ") like '*' &...
...Sub ImportCDR()
Dim strFile As String
Dim strFolder As String
strFolder = "\\Officehp\my documents\Customers\Requested
CDR's\Viewed\"
strFile = "*.xls"
strFile = Dir(strFolder & strFile)
Do While Len(strFile) > 0
MsgBox strFile 'temp error checking to verify loop is working...
I finally got it -- I have to set the dest listbox to null:
me!dest = null
in order to requery it and set focus to it. Don't really know why, but it works!
TheAceMan1 & lastout
Thanks for the info on the bang. I revised my code to have the ! instead of . where pointing to a control. I also simplified my example code even more to eliminate anything extraneous to describing this problem. (like the variables you were asking about why I didn't pass...
TheAceMan1,
No, they are not on a subform. I even tried making a dummy form from scratch, putting generic listboxes on them with very simple data, and got the same problem after running my highlight procedure.
Hi Aceman1
I have a requery right at the end of the highlight procedure. I can see the new records just fine, I just cannot click on them on the first try.
Hi everyone, I'd be grateful for any assistance...
I have 9 listboxes ("list1", "list2", "list3", etc..) that are lined up on a form. When a user clicks on one of them, I need all the other listboxes to have the same index value be selected as well. This works well with a for...next loop, and...
...up of repeating chunks of 112 records. Each group of 112 records is a pattern that establishes a class scheduling system. It is made of 14 weeks * 8 class types = 112 records.
tblClassSchedule
ID WeekNum ClassID LocationID StartDate...
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.