I had the same problem with a program. Below is the script that I made. It shuts down the process waits 10 seconds and then restarts the process. When the process is back up a ready message box appears. It is used on XP pro so your permissions may need to be adjusted...
I am trying to use a DLookup to fill in a text box"
MTMiles.Value = DLookup("[DHMiles]", "taRate", "[ShipID] = Forms![sfLoadPlanning]![CurrentLocID]" And "[RecID] = Forms![sfLoadPlanning]![Shipper]")
When it is executed I get a 'Type Mismatch!'...
I'm not really sure how to approach it without seeing the structure of your forms and tables. I there any way you could send me a copy to look at with out any data?
I had the a very similar situation to what you described. Sometime it worked fine but some times the text box said #Name. I put the IIF statement in the query and haven't had a problem since (about 3 weeks).
Resubmit again
WLTC,
try Putting this in the AfterUpdate of Text40:
**************
Text50.SetFocus
**************
Put this in the LostFocus of Text50
****************************************************
If Text40.Value > 1 And Text50.Value = 0 Then
MsgBox "This field cannot be...
Resubmit
WLTC,
try Putting this in the AfterUpdate of Text40:
**************
Text50.SetFocus
**************
Put this in the LostFocus of Text50
****************************************************
If Text40.Value > 1 And Text50.Value = 0 Then
MsgBox "This field cannot be zero"...
WLTC,
try Putting this in the AfterUpdate of Text40:
**************
Text41.SetFocus
**************
Put this in the LostFocus of Text41
****************************************************
If Text40 > 1 And Text41.Value = 0 Then
MsgBox "This field cannot be zero", vbOKonly...
bluegnu,
you could use SQL to append the records. I don't know the information or table structure that you are working with but here is some basic code that could get you started.
1. on your form create a button to copy the info.
2. in the on click property enter the following code or a...
cathy
An easy way to build the code is to create a saved action query ( in your case, I think, append) from the table that you want to add to and then view SQL and copy and paste it into your vba. When you CR lines use: " & _
example:
strSQL = "INSERT INTO Table var1, " & _...
Is it better or more stable to use sql code directly in a vba module than have an action query called from the vba module, particularly in a multiuser database? The database has a front and back end and each user has their own copy of the front end on their computer. It seems that I get a lot of...
Let me add to that:
In the On Lost Focus Property:
If Not IsNull([DateTxtBoxHere].Value) Then
[ButtonNameHere].Enabled = False
Else
End If
This way the button will only disable if there is a date in the datestamp text box.
holle,
You could have the button set focus to another control, the date text box for instance:
in the On Click property:
[DateTxtBoxHere].SetFocus
and then in the On Lost Focus property:
[ButtonNameHere].Enabled = False
Davide77,
You could set the Conditional formatting to change the backcolor and font color of the text box to the same color as the backcolor of your form when the combo box says 'no'. It won't really be hidden just camoflauged.
Nick24,
Maybe instead of telling them to close the report have a pop up subform that says something like "Click 'OK' to continue" and the 'OK' button simply closes the pop up form and the report at the same time.
Hope that makes sense.
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.