I tried the edits as suggested however, I'm still getting an Out of Context value on the variable.
What I need is to reference a table using the user name txt box to select the appropriate record from the table. Then I want the variable to be set to the SecurityLevel which is any number from 1...
I checked this out but now I get a "previous action cancelled" error.
Private Sub Form_Open(Cancel As Integer)
Dim SecLev As Integer
cboSombox.Requery
SecLev = DLookup("[SecurityLevel]", "tblUsers", "[UserN]=" _
& Forms!frmLogin!txtUser)
End Sub
Any idea what I'm doing wrong here?
Hi All,
I want to set a public (global) variable via a query in VBA for Access. I have an idea like this:
Dim SomeNum as Integer
SomeNum = "Select sometable.field from sometable where sometable.field=Form!frmform!field
I think I'm close, but something is missing or I may be way off. Any...
I'm working with Crystal Reports 11 and I needed to add a couple parameters to a report. However, these parameters need to be optional. As it stands two date parameters I added are currently required as the prompt dialog will not run the report without the dates being filled in.
How do I go...
I figured it out. It has something to do with the procedure action call itself. I changed it to act upon the combobox changing instead of OnUpdate and now it works fine.
All fields on the form will function correctly and I can change my focus without any problems until I select a county in the county combobox. As soon as I update the combobox it acts like the focus is stuck on it after the procedure has updated the three listbox fields. The only way out is to...
Me.DistrictNum.RowSource = "County?" is just a value statement stating that if there is nothing there then say "County?" to alert the user of missing info.
The controls for Me.DistrictNum, Me.EEO_Region, and Me.Craft are listbox controls and the county is a combobox control.
Thanks for your...
I have the following code on my form to assist with autofilling other controls on my form. This works great, however, once the county field value has changed I cannot move to other fields on my form.
*******Begin Code*******
Private Sub County_AfterUpdate()
If IsNull(Me.County) = True...
That helps tremendously! This is what I have so far from the code you gave.
****Begin Code****
Private Sub County_AfterUpdate()
If IsNull(Me.County) = True Or Len(Trim(Me.County)) = 0 Then
Me.DistrictNum.RowSource = "SELECT Distinct TaxCode From Counties ORDER BY TaxCode"...
I’m trying to get certain fields within my form to populate from a table based on another control’s value. For example, when a user selects a county from a drop-down the fields for district number and job type should automatically fill with information that pertains to that county on the form...
I was recently "elected" to add a field to a stored procedure but when I have everything in place I get the following:
"Error 8155: No column was specified for column 14 of 'a'."
I have colored the changes I made. Any ideas on what I am doing wrong or missing?
Thanks!
***Begin Code***...
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.