Thank you all for your help. Wrapping the Nz function in Val() worked perfectly. Thank you Golom for explaining exactly how Nz determines the type.
"Never laugh at ignorance. You may not know what your laughing at."
I'm having trouble with a result set that returns null values that I want to convert to a zero numeric value. If memory serves me right, the following function would return a zero if applied to a null value field.
Nz([field1],0)
When I use this in a query, the field returns a 0. But for some...
I had this exact problem earlier today. Found this article on MS and it did the trick perfectly.
Microsoft Knowledge Base Article - 296205 - ACC: Error Message: ActiveX Component Can't Create Object
I had to register DAO by running the following from the command prompt.
regsvr32 "c:\program...
Linq/Ken,
Thanks for the help. That worked like a charm.
A star for each of you!!
Thanks,
Will
"Never laugh at ignorance. You may not know what your laughing at."
Ken,
Thanks for the tip. I knew that was a setting I could change somewhere. Now, can I leave that as the default, but have only one particular field in a form act differently.
Is this something that I could set on the properties of only one control and not have it be a global setting for my...
Does anyone know how to prevent Access from selecting all the text in a text box when you tab to it in a form? I want a user to be able to tab (or press enter) to get the focus on a text box, but have the cursor at the end of the existing text in the control rather than highlighting the entire...
qwert,
Your right. I realize now that you can change the autonumber to a higher number, but not a lower number. For example if your autonumber is at 12000 and you want to reset to a lower number, you can't just delete all the existing records and lower the autonumber.
Will
If you are trying to do this to a new table, it's pretty simple. Create your table and before you enter any data into the table, use an insert query to add the first record to the table.
Like so:
INSERT INTO TableName (autonumber) VALUES (25000);
This will create a record with the value you...
Dataguy,
Thanks for your suggestion. I already have the cursor as an hourglass. Also, the operation is fired from a menu item and it opens an email form using the user's mail client, so there isn't an active form that I can use to display the message.
Guess I'm stuck with having to create...
Yes. I realize that using Msgbox won't work for what I'm looking for. I was hoping there was some function that would create a pop up form that I could close programatically without having to create a form in my app as in your example.
In hindsight, that doesn't make any sense. Why create a...
Bill,
Thanks for that suggestion. I was actually looking to see if there was a way of creating a pop up form without having to create a new form in my app.
Kinda like using the code below to have your code pause until the user acts on the pop up window. But I don't want the OK button the on...
Rick,
Am I right in assuming that you have each field from your record displayed in a separate control on your report with the static text as text boxes in between the records? If that's the case, short of JoyInOk's elegant solution Access can't adjust the position of controls to the left and...
What would be the best way to create a message box using VBA that will pop up when a procedure begins running that tells the user to wait . . . Then closes when the procedure completes. So the user doesn't think the app is hanging.[hourglass] I tried using the msgbox function, but it seems to...
Hmmm. What exactly is the definition of OnActivate? I've never used that event as a trigger. Could you explain the difference between OnGotFocus and OnActivate?
According to Access Help files, the Activate event occurs whenever a form receives the focus. The main point though does seem that...
Correct me if I'm wrong, but wouldn't it be easier to just put the following code in the On_GotFocus event:
doCmd.Maximize
That way, anytime the window gets the focus, it maximizes. That always works for me.
Will
Nettie,
Esentially, what you would need to do is create some code behind every action that you want recorded that would append a record to your audit tables accordingly. This can be done by writing an append query that would fire when an action is performed. Obviously, a specific query would...
Riverguy,
Check the field type of Field3. It's probably an integer. It needs to be a single or double, or if you are working with percentage, you can just use the currency type and it will be accurate to the hundredth place.
HTH
Will
The feature that I mentioned above works in Access 97. I don't have a copy of 2000 or higher, so I'm not sure if it works for those versions. But I do know that it works. Make sure that you change the Page setup while in design view of the report and save the report. Then it will keep that...
There is a way to specify a printer. In design view of the report, go to File=>Page Setup. In the page tab, you can select whether you want the report to print to default printer or a specific printer.
HTH
Will
I'm trying to create a function that will export a linked table from the current db into another one. The only problem is that it's exporting a link to the back end to the other db. I want it to actually export a copy of the back end table to the new db, but I need the process to be done from...
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.