I'm trying to find the number of years between two dates: The first date is a persons date of birth compared to todays date.
I'm using the query grid in Access. The formula I've been wrestling with is this:
Years Old = DateDiff("yyyy",[DOB],Date())
I would like the result to give number of...
Hopeing someone can assist. I would like to send the contents of a list box to Excel. Is this possible? If so, I sure would appreciate some assistance as to how.
Thanks
Roger
I used the following code in Access 97 to open a RecordSet within a Function for follow-on processing. When I tried the same code in Access 2002 I get an error on line "Set rst". Can someone tell me if this is still a valid way to approach this.
Public Function FindAuthStr(varx As String)
Dim...
I have two tables:
employee( employee-name, street, city) - PK employee-name
manages(employee-name, manager-name) - FK employee name
I need to find all employees in the DB who live in the same cities and on the same street as do their managers.
Obviously managers are also employees so its...
I open it in a standard module. Reason being is I have 5 other forms that use the Sub. What is strange about this problem is the code below works. It is also accessed from another form module vai a sub call. It works even though the table field is defined as text and I have the argument defined...
lesPaul,
OK it was a text field and I made the change but it still doesn't work. Am I using the "AND" operator correctly in the SQL statement (last line)
I have a query named qryVacantSlots with two fields: "orgstrPrNbr" and "strestrPosc" I also have a listbox named EfficiencyListBox. sqleff is defined as a global variable.
The SQL statement I'm using to populate the listbox is embedded in a Public Sub Below. The call I'm...
Jebry was so kind to help me with the following code I used for Rowsource in a listbox. However, I need to add another variable for seaching. The current variable it uses is "varx". I need to add an additional called "vary'. I was hoping someone could assist in properly formating...
TLady works great thanks...is there a way to change the color of the names? I would like to have the headings a different color than the data under the headings?
Tlady,
Here is my code. How will the compiler know what field to look for in the query if I change the name?
sql = "SELECT qryExcess.sidstrNAME_IND,"
sql = sql + " qryExcess.sidstrGR_ABBR_CODE, "
sql = sql + " qryExcess.sidstrDUTY_POSN,"
sql = sql + "...
I built a listbox and populated it by using Rowsource with and SQL statement. Is it possible to change the column names the query provides to the listbox via VB? If so could I request an example.
Thanks
vbaJock,
If I wanted to use a variable in place of the 643 what would the difference be in the format? Reason I ask is because this number is the criteria that will be used to filter the query.
vbaJock thanks for helping.
I'm trying something else and I think it wil work if I can figure out the formating for extending SQL code over five lines. Here is what I have but I keep getting syntex errors. If you could give me some expert advice on this I think this thing will finally...
vbaJock,
This is how I approached it but I'm getting an syntex error:
Me!ExcessListBox.RowSource = Select sidstrETS FROM qryExcess Where orgstrPrNbr = '650'
sure would appreciate your expertise :)
Thanks
I know it can be done via the property box but I need to do it from within a "procedure." I'll have multiple forms accessing it.
For example I'm looking for something like this
Me!ListBox.Rowsource = SQL statement
Is it possible to progmattically attach and SQL statement to Rowsouce? For example I would like the SQL statement to select five fields form a query and use this to populate the listbox. If so an example would be appreciated.
Thanks
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.