try this:
Private Sub UploadData()
Dim wks As Excel.Worksheet
Dim wkbk As Excel.Workbook
'here you set get the workbook and set the worksheet to the hidden sheet
Set wkbk = GetObject("H:\BulkUpload.xls")
Set wks = wkbk.Worksheets("upload")
'Activate the sheet and...
is the query a saved query or a sql statement? If it is a query then you can place the name of the query into the Table argument and it should work.
A sql statement requires a little more work. You could create a new querydef and append it to the querydefs collection then use the...
The problem might be that the checkbox(I assume that this is a checkbox on the form) is defaulted to Null unless otherwise specified for new record or in an unbound form. I always give a default value to the checkbox, that way it its either true or false and not Null.
Just thought I'd add my...
Yes, its called subform with a datasheet view. I know it isn't very helpful but, after playing with grid controls for some time I've come to the conclusion that the datasheet is the most versitle. You can control its recordsource or load it with a recordset. you can even create it...
Try this:
If the second form is just a "new record" form (to schedule a new date) then I would do it this way.
Private Sub cmdSchedule_Click()
Dim stDocName As String
Dim stLinkCriteria As String
Dim caseNum As String
caseNum = Me![CASE_NUMBER]
stDocName =...
Try this:
Click Start and select Run.
Type this into the commandline "C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSACCESS.EXE" /decompile "C:\PCL Timsheets\Exeter\TMajor\SecureTimeSheet.mdb"
Make sure that you have the correct path to Access and to your database name
From...
I'm not sure if this helps but what I do is have a local table that holds the names of the SQL Server table Names (as they appear in Access) and their SourceName (table names as the appear in SQL Server) usually they look like this:
tableName: dbo_LookupCodes; SourceName: LookupCodes
On my...
I have this problem with multiple records with the same address, but different people. I want to save some money on postage, so if I come across two or more records with similar addresses, I want to have it print out with the first names of the individuals, their last name (which will be the...
Are you holding some of the data in temp tables in the front end? If you are, drop the temp tables as soon as you can and make sure that you compact on close. One thing you might try, and this is only if you wish to revisit how your mdb works, is to scrap your queries and use the sql...
What is the loop for?
Try this:
Private Sub fraReport_AfterUpdate()
If Me!fraReport.Value = 1 Then
Me!BeginningDate.Enabled = False
Me!EndingDate.Enabled = False
Else
Me!BeginningDate.Enabled = True
Me!EndingDate.Enabled = True
End If
End Sub
Hope that...
This may help you, make the form unbound and when the user presses the save button just run a series of "Insert Into" queries. Make sure that you start with the table with greatest priority.
With a database application that I am developing, I log donors and donations. I save...
You use AND:
Private Sub SolveH_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Issues"
If Not IsNull(High) Then
stLinkCriteria = "[Priority]=" & "'" & Me![HighF] & "' AND [Status] = 'Open'"
DoCmd.OpenForm stDocName...
There is a syscmd function that will allow you to use the progress bar that runs during a query. Check out the help file to work with it. The ActiveX ProgBar is really only a distraction - it actually takes resources (memory) away from the query to make it look like there is real progress...
Aaron, if you're using Access 2000 you can use the Replace() function. What i do is check my criteria strings for single quotes then replace it with chr(44) which is an apostrophe (single quote is chr(39)) ex:
strCriteria = Replace(strCriteria, "'", chr(44))
that works just great...
First, is there a reason that you don't have ID in the second table? Names are easy to duplicate.
Anyway, I would use a multicolumn combo with a rowsource set to a SQL statement "Select Name, Field1, Field2, ID from tblProducts, tblData
Where tblProducts.[Name]=tblData.[Name]"
set...
I have an idea, but its just like the multi column listbox kind of thing. The Combobox's columncount should be set to 2, columnwidths 1";0". Set the RowSourceType to "Table\Query" and then create a query that will have the medical report choices (maybe a lookup table...
Sorry, I said if you want the 3rd column. That's wrong. The listbox columns are zero-based, so the first column is 0 like this: Mylist.column(0,varitm)
I'm sorry if I confused you (thank God for debugging tools)
Bob
Just create a listbox and set its MultiSelect property to Simple or Extended. Simple lets you select more than one value in the Listbox and while Extended allows you to select a range of the listbox's values (ie Listbox row number 1 - 5, 'simple' lets you select rows 1,4,6,7,9 separately.). To...
Try this:
If IsNull(Me.Processing_Comments.Value)Or (Me.Processing_Comments.value = "") Then
MsgBox ("Please Explain Yourself")
End If
Hope that helps.
Bob
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.