Hi, i cannot load posts from a specified date and time
PostDate = now()
'AID = accountID of the poster
'read post after added into DB Set rsForum = Server.CreateObject("ADODB.Recordset") strForumSQL = "Select * From tblPost where tblPost.PostDate = '"&PostDate&"' and tblPost.PostBy = "&AID&"" rsForum.Open strForumSQL, strForumCon,3,3 PostID = rsForum("PostID")
I gets an error when posting messages, i think is because: tblPost.PostDate = '"&PostDate&"'
PostDate is no text field, its a Date field and i tried to use this symbol: ' around postdate, i also tried to not use it, but then i gets another error:
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'tblPost.PostDate = 12/11/2005 10:32:50 AM and tblPost.PostBy = 6'.
but that is because the date/time format uses spaces. How can i fix this?
Hey guys- Been trying to figure this out, but am stuck. Obviously I'm fairly new to Access...
I have a table of properties and the price those properties sold for. Each property is in a specific area of town. I want to take each record and display the Address, Area of town, Price it sold for, and then the AVERAGE PRICE of all the other properties that sold in that same, specific area (not all the other areas of town, but the same area that the property sold for). The result should be displayed as below-
-Address- -Area- -Sold Price- -Avg Sold Price in Area-
And then it will list every property in the database, each with the same calculation all in one grid/table/dataset.
I figured out how to write a query to average all the sold prices in each area- but I don't know how to display that in conjunction with each record. Can someone throw a hint at me here? Thanks
I have not developed a database application before. At my work I was seconded to fill in as a team lead for a change management team. We are in a production environment and need to track the progress of product improvements. The current system is very complicated using an enormous Excel spreadsheet and a very bid MSProject schedule. It is very handraulic in the way it is maintained.
Before I started I reviewed who inputs data, who uses the data, and what metrics are reported. I can reduce the amount of data that is recorded by only generating many of the existing Excel fields through calculation run when a report is generated or a chart populated.
I need to track the state of several hundred minor changes through the production run. The reference data I need to store is serial number against production batch. This is fixed data that is not changed, only used as to show the entry point of a change into the production line and which serial numbers the change is applied to.
So I have a list of records in a continuous form. Within that record is a checkbox called GRT. GRT stands for Gross Receipts Tax, when it is checked I have an after update event that adds a new auto-generated record for the GRT entry. The new record copies the date from the origional record, calculates GRT from the origional records amount field and some other things like that to create the new record. Creating the GRT record entry has went well.
But, if the user removes the GRT checkbox from, or deletes the origional record, I need to delete the corresponding auto-created GRT record. I thought I could do this by simply grabbing the origional records ID and copying it into the auto-generated records field called "AssociatedID".
Problem is, when I reference the origional records record ID, it always comed in as "-1". I can display the ID on the form and it shows correct, but if I msgbox the records ID, it shows as "-1". I cannot figure out how to capture the origional records ID so I can insert it into the new auto-generated record so the two records are linked so I can later use that link to delete the proper associated record.
Is it possible to declare a reference as an object, this way we could avoid our issues with broken references? I would just try it, but it seems like there is a quite a lot of testing it would require.
I have a rental database and I print several contacts for leases etc. what I want to do is have a unique reference number or something inserted to the report every time that it's printed. What I am trying to achieve is to keep track of which tenant corresponds to the report (Lease) printed by using reference number.
There is a seperate form which holds the tenants details and I would like to have a field on that form which would show the same reference number as the report so I can track which report was printed for who.
I was trying to run the front end on the 6th pc and this error "You cant go to the specific record. you maybe end of a recordset." showed up. But no such problem for the others.
I have appx 500 customers that have contracts..... The contracts have 15 products that are available. Not all of the customers purchased all of items on the contract. I want to have a database that lists (on one page) the client information, contract information and the product details for that customer. I have no clue how to go about doing this. The Contact database template is what I am starting with. I want to click on a customer and pull up the information all on one page.
I have a project with several activities, each activity has specific people who work in the activity and of course an ID for the activity. Now every person has a unique ID, name, address, birth date, address ,,,, etc
a person can work in several activities ,, now what i want to know is should i put activities in a table , and persons in another table or what !!? how can i connect the two tables? How can assign a new activity for the persons?
let us say that all the activities need 100 workers, but there will be duplicate of the workers, how can i find the actual number of the workers without duplicate?? ( i need to find the numbers of all workers and the number of the actual workers)
Finally i want a restriction that if a person worked in five activities, i want an alarm or warning that this person has worked for four activities and he can't work any more, is that something i can do !??
I've created a log in system with a tutorial I've found on YouTube. It simply redirects users to a specific form after a successful log in. Here is the code:
Code: Public Sub Login() On Error GoTo ErrorHandler: If IsNull([cboUser]) = True Then 'Hier wordt gechecked voor de UserName
[Code].....
The users are defined in tabel "tblUsers". All users are now redirected to the form "frmMenu" which is good.
However, I would like to know how to add an exception. For example
1) All users should be redirected to frmMenu after a successful log in. (Check) 2) The user called "Management" should be redirected to an other form "frmMgm"
I've searched on the internet on how to do this but without luck. (forums.asp.net/t/1775325.aspx/1)
So in short:
IF user "Management" logs in THEN redirect to frmMgm (or whatever form)
I have to make a multi-user manage database.All the usernames are sorted in one table and exported to listbox in Form.For each user there is a separate table with 3 columns where i must fill information from listboxes.The listbox (there are 4 listboxes, one for users select and 3 for different parameters) are located in MainForm where you select the information.My question is how can I select a specific username(table) from the listbox and fill the information from the other listboxes to the selected one?
The usernames table is named - Clients
each table for separate user is named client1, client2, client3 etc.
the form where you choose what to select is named Fill form.
The listbox for users is named - List71 And the listboxes for parameters are named - List75, List77, List79 Also there are 3 textboxes with calculated fields that i also need to insert in the specific user table.
I am looking for a way to store thumbnail images for specific records. I want an idiot proof way of selecting a jpeg image and then storing a 200x120px bmp version of the file in the database. Is this achievable with VBA code?
I'm using a certain font - Guttman Yad-Brush (Hebrew, comes as a part of windows in Hebrew) in some forms and reports. On the design view of the objects, everything is OK. But when I try to display the form, or a print-preview of the report, Access refuses to show me that font. The text is clearly visible, in Hebrew, but in another font (I think Times-New Roman, but not sure).
The font is well installed, and works fine on other Office applications. Couldn't reproduce this behaviour with other fonts (but obviously haven't tried them all).
I have been trying to figure out a best way to attach files to specific records. Up until this point have been using Hyperlink to link files that have been stored in shared folders. This seemed to be a very good option for quiet sometime; but some users wish to play god ! Since I have to give them RWX permission on the folder; they go into the Shared folder and either rename the file or move it around or worse, DELETE the file permanently. Thus messing up the hyperlink.
Now I am planning to use the wretched Attachment data type in Access. I know it will bloat the DB, but this seems to be a safer option. As I can control DELETES/EDITS. So I was thinking to use a stand alone DB, just used for Attachment tables. As these records will not be accessed everytime.
My problem is, I remember vaguely using two linked backend DB files, put a lot of strain on the front end. Thus making the connection very slow. Sometime even upto 10 seconds to simply load the login form.
My idea is to establish a persistent connection to the two DB files on front end opening. Thus the connection is always there so it might not be that slow !
Or is there something I could look into to manage the Files/Attachments more efficiently, other than Hypelinking?
Open a specific Windows Folder.I am using this code to open a specific Windows folder ..... and it works perfect:
As String Dim folder folder = "c: Documents WORD" Dim Retval Retval = Shell ("explorer.exe / e, / root," "" & folder & "" "", 1)
... but also need to open in the specified path, taking the data "UserName" of one field in a table:
TABLE: "Assignments" IDEExp, UserName, Date
So instead of going to the folder = "c:Documents WORD" would go to: c: Documents WORDUserName ". In Windows and subfolders are created with UserName1, 2,3,4, etc.
I have a table called "tblEmployees" with columns "EmpName, EmpPassword, strAccess" in my table
The login form works but I wanted the user to go to a specific form that would be designated under strAccess
I have this code but it totally wrong to what I want it to do but not sure where to start
'Close logon form and open relevent page Dim stDocName As String stDocName = Forms!CopyfrmLogon!cboEmployee.Column(3) DoCmd.OpenForm stDocName
[Code] ....
"stDocName = Forms!CopyfrmLogon!cboEmployee.Column(3)" - this is the line that needs to be debugged ... I need something that says open form specified in the the column "strAccess" of the "tblEmployee" tables
I need to import circa 900 .txt files into a dbase (yet to be built), they are all of a standard format/layout. I need to import the top line into about 9 columns. So not sure how, but it can be mapped to pull the same digits per column every time.
I want to ask what is the code for Macro Builder in a command button if I want to open a report from the given value of inputbox. I made a command button to open a report but it will ask first the required value from inputbox I put. then it will open the report of specific record from the value I input in the inputbox.
Set TRANS1 = db.OpenRecordset("SELECT * FROM MASTER WHERE DatePart("yyyy", TRANS1![CDATE]) = " & 2014, dbOpenDynaset)
In the above recordset selection, the ACCESS seems do not allow to have the DATEPART("YYYY") function in the syntax. As CDATE is a table field with date/time data type. Just want to know, how to do this kind of date selection. My purpose is to select all records according to a specific date to the TRANS1 recordset.
I have a table in my database whose forms are refusing to open to specific records. They only open to a blank record--either by using other forms to open to specific records or simply by opening the form straight from sidebar. Even the Navigation bar doesn't allow me to move from one record to another; it only shows "1 of 1".
The "initial" form, which creates new records in the table, works perfectly--in creating a new record. I can create a new record, use the Navigation bar to move to a new record, create it, and move back to the first. But then when I close and re-open the form the above issue once again comes up.All my other tables--and the forms that are associated with them--work perfectly and I can open them to specific records without a hitch.
I have a specific access database that my customer have sent to me and it only works in a specific folder. I want to make it analyzed and worked in other folders but when I click, it turns out with a warning box that I should work with it in that folder.
I have a button that when pressed it checks a specific file for documents with the same name (example: Test, Test 1, Test 180, ect...)
Code: Dim StrFile As String StrFile = Dir("C:UsersJohnDesktopTest*test*") Do While Len(StrFile) > 0 Debug.Print StrFile MsgBox StrFile StrFile = Dir Loop
The problem with this is if there are 2 files with Test (Test, Test - Copy) It gives me 2 separate message boxes. The first with Test. Then a second message box with the second file, Test - Copy. I want to combine both of the message boxes in to one. So the message box would look like: