When are you wanting this to occur?
If you're loading a form you can use VB code to set the text box to the user name.
Using an "on load" event:
txtUser = "type username here"
Also, if its just 1 particular username that you want to enter, you can just set the defualt value of the textbox to the username.
User Profile
Collapse
-
So you're making query called "EmployeeUnion" ? Then, querying a query?
This would be really helpful.
Thanks again....Leave a comment:
-
The tables really only have 1 common field; Emp_ID.
Also, I want to return all the values in tblDxx that match the combobox selection.
The database is on my hard drive and has no / is not linked in any way.
I wlll give some of the suggestions a try and post an update.
Thanks again for the help.Leave a comment:
-
VB SQL trouble
Hi all,
I'm having a problem with some SQL code in VB I'm using for Access. I have a combo that allows a user to select an employee and opens a query to display its results. Yesterday, this code seemed to work fine and give the proper results. There have been no changes to this code since yesterday.
...Code:Private Sub cboEmpName_AfterUpdate() Dim db As Database Dim rs As Recordset
-
Figured out a better way. For those out there that would like to do the same or someting similar, you can do a ' DoCmd.RunSQL "INSERT INTO ... SELECT"'
statement. Breaking that down, you can tell the sql to INSERT INTO tblB (where you want the data to go) SELECT * FROM tblA (where the data resides)
My first attempt at doing this looked like:
...Code:rs.Open "SELECT * FROM tblEmployees", CurrentProject.Connection,
Leave a comment:
-
Update table from another table.
Hello all,
I have a form that allows a user to add employees. I have written the code that uses the "on click" event from a button, attempting to add the employee's info into 2 tables, tblEmployees and tblDxx. The Dxx refers to the department number that the user selects from a drop down box.
I believe I almost have it. I'm trying to store most of the info into tblEmployees and then just use the Emp_ID... -
Access will not allow me to put table names in the bound column. It does not allow text to be entered. I can select the ValueList to be the RowSource of all the table names, so that the combo is the selection that I want to be there. I'm thinking this is what you meant.
Also, after I do the said steps above, I get the error:
"Method or data member not found." and it has cboSearchDept selected.
...Leave a comment:
-
Thanks again for the reply!
It didn't like the RecordSource statement that you provided. It or any variation of it produced the same error: "Syntax error in FROM clause".
I may have found a different way. I'll just write a query for each SELECT statement and tell it:
If 'cboSearchDept' = 10 Then
DoCmd.OpenQuery qryD10
End If
All I need now is to figure out how...Leave a comment:
-
That first sentence is supposed to say:
"Are you implying that the SELECT statement isn't an ACTION query?"
I would have to agree with you. However, the error says that the 'DoCmd.RunSQL' action requires an argument consisting of a SQL statement, not an action query. This tells me that the statement that I have written isn't recognized by VBA as a valid SQL statement.
Any other insight appreciated....Leave a comment:
-
Are you implying that a SELECT statement isn't
Yes, I would like to display the results of a query on a subform. The problem with putting it as the record source is that I have to define a query. The query will change depending on what the user selects in a combobox on the parent form. Acutally, the query will stay the same, just changing the FROM table.
Example:
User selects 11 from combobox (cboSearchDept)
...Leave a comment:
-
SQL Code error in VBA
Hi,
I'm trying to display my query results onto an Access subform. I have written a very simple SQL statement to preform a query depending on a user's choice of a drop down box in an attempt to display the resultset on the subform.
Example:
If the user selects 10 from the combobox, then it does a query saying "SELECT * from tblD10;"
No matter what the SQL statement is, (i've tried simple ones... -
Possible to SELECT all tables?
Hello,
I'm curious to know if there is a way to select all tables when using a query in access. I have some (unsuccessful) cascading combo boxes and need a little help maybe working out the query. I am familiar with database concepts, but am new to Access. The problem is in the query statement. I'm not sure what to put after FROM because it would depend on the user's entry.
I would need it to look something like... -
Cascading combo/listboxes
Hello all,
I am fairly new to Access. I have a decent understanding of database concepts from working with sql developer and Oracle's APEX. In MS access, I would like to know how to populate a list from a list of values (maybe a combobox in Access?) On my form, I have a combobox that has values from a "Letters" table, which is A-Z. I would like to know how to populate a listbox/combobox to retreive Employees names (Last name,... -
I'll look into the above advice. Thanks for your timely replies.Leave a comment:
-
Nice humor there... =P
Is there any way to do that remotely? The users will be away at a "summer camp" where I have computers setup for them to do work and then give them some time during the evening to email and for casual use of the net. I can't exactly type in 192.168.0.1 and pull up the firewall settings since it is at a distant location. Also, they will be connecting to the university domain, and...Leave a comment:
-
Disable IE or Internet Access between time periods
Hello all,
I'm looking for a way to basically disable IE (or internet access in general) through group policy. I would still like our users to be able to log on to the domain at all times during the day, but only in the evening (say, 5-12pm) will they actually be able to surf the net / play games etc.
The users are not power users or admin, so they would not be able to install new programs (such as FireFox) to use... -
Associate old files with new installation.
Hello,
I am curious to know if there is a way to associate old files with a new installation of windows. I reinstalled windows b/c the OS crashed and would never boot. Upon installing the fresh copy, I made a seperate folder called Windows2 to store the new system files and just to make sure that none of my data was lost. I now want to have all my old programs and such to load correctly. I know that I could just go and reinstall... -
Sorry for the double-post =\
I also might add that I'm trying to install from a cd/dvd drive. When I look at the permissions, it (of-course) says the files are read only. I still get the same "cannot execute" even when I copy the files to the hard drive and try to execute from that directory.
Thanks in advance....Leave a comment:
-
install -load cannot execute error
Hello,
I'm trying to install ArcInfo 9.2 (GIS software) on an Ultra 40 running Solaris 10 (x86). I am also extremely new to the unix environment. When I get to the correct path and try to run the install -load command from the command line, it brings back an error:
"cannot execute"
I've done some research and most of the problems I've seen have been occurring when users are confused about on which platform... -
Thanks for replying. I will fix the errors and try agian.
To your first question: Yes, the page was created by our professor in which the whole page was tables. Part of our assignment was to remove the styling information from the tables and include the CSS style info internally. I'll repost if i still have problems.
Thanks again...Leave a comment:
No activity results to display
Show More
Leave a comment: