I spent quite a bit of time yesterday finding a solution to a problem, and I did get it to work, but I feel sure there is a much easier way to accomplish it. I welcome any ideas on making this work better.
I have a Union query that returns 48 rows (theoretically this number is consistent...
I am trying to find the "last saved date" from a group of files. One is an Excel file and the others are .txt files. I was able to find the correct date for the Excel file using BuiltInDocumentProperties after using GetObject, but GetObject is not working on the text files. Do I...
It sounds like a Tab Control was used. You can have a number of different pages displayed, each by pressing a button. The default Style is a Tab, so if you want buttons, you will need to go to the properties sheet for the Tab Control and change Style to be Buttons.
Stefan,
If this calculation will be used by more than one form, you should create a Module for it. Click on the Modules Tab (next to the Macros Tab), and click on New. If this will OLNY be used in this form, you can place the code in the module that belongs to this form.
If you create a new...
Stefan,
You need to create a function like:
Private Function VerifyData as Boolean
If txtJanuary >1 and txtJanaury <15 then VerifyData=True
Exit Function
You would modify the If..Then to check for your desired information - including weather or not the value results in your reliant...
Are you trying to write history to a table regarding who is opening and closing forms and when? Assuming this is the table to store the desired information:
tblFormHistory
-------------
FormHistoryID
EndUserID
FormName
DateOpened
DateClosed
Create these functions in a module:
Public...
Then all you need is one line to save the changes:
If Dirty = True Then Dirty = False
However, if what the user entered isn't valid for that field (ex. it's a number field - what happens if they enter text?), they will get an error.
Open your form in Design view and open the properties sheet. Click once on your text box to select it. On the On Exit line use the drop down box to choose [Event Procedure] or click to the right of the drop down box on the Builder Button (...) and choose Code Builder. It will place the first...
Stefan,
How about checking each text box as you leave it and writing the data to the tables if it is valid. Something like this:
Private Sub txtJanaury_Exit(Cancel As Integer)
If Dirty = True Then
If VerifyData = True Then
Dirty = False
Else
MsgBox...
In trying to figure this out, I'm checking out various properties. I notice that the ColTyp on the combo box I'm using doesn't change in Access 97 (where this works), but in 2000 it does. On load it is 0, then when the RowSource is set the first time it becomes an 8 when fraReportType is 1 or...
Here is the code that modifies the RowSource. At the end of the code I Null out the value of the Combo box and set two other Combo boxes to have the same RowSource.
Private Sub fraReportType_AfterUpdate()
Select Case fraReportType
Case 1, 2
lblPeriodCurrent.Caption =...
Compucop,
I think your problem has to do with the data type of your field Number in your table Table1. If the field has a data type of number then your statement is looking for:
...WHERE Number=7...
If your field Number is a text field then your statement is looking for:
...WHERE Number...
Hi,
I recently converted a db from 97 to 2k. I have a combo box with the RowSource modified in the code as different option groups are changed. One of the statements returns a Short Date and another returns the Year using a DatePart function to find it. The combo box worked fine in 97, but...
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.