I'm trying to mess with a combo box where when one user selects a value a form opens up. This is the code I'm typing in but I keep getting a syntax error
DoCmd.OpenForm(Phone,[View As AcFormView=acNormal],[DataMode As AcFormOpenDataMode=acFormAdd],[WindowMode As AcWindowMode = acWindowNormal],[OpenArgs])
all of a sudden now, when i open my form, its not displaying any of the previous data that i stored in it!! All the data is still in the table, and when i add data it goes into the table!! I checked properties and the record source and everything is ok there, what have i done wrong guys...HELP!!!!
I purchased a copy of Office 2003, on Ebay, for less than half the price it normally sells for. I created databases, which work well on my computer. However, when I copy them over to the office computer from my computer, via Flash memory stick, the program does not run. The message seems to indicate a problem with registration. When I installed Access, it asked me for a registration key, which I did provide. After that it worked-not activation process. Does this mean that you can only use the computer you created the database on to run it, or that I do not have a proper version of Access 2003? I cannot transfer, from my home computer, to the office computer. Is this Microsoft paranoia again? Subsequent uninstalls and reinstalls of the program did not ask for the installation key. What should happen? I would like to resolve this major problem and your help will be greatly appreciated. The program is flaky. Also, Switchboard does not work-must use Option Box.
These questions most user must know about initial installation and copying mdb files to other computers -please reply.
i have a string variable denoted by cui and i need it to take value from table tblPersoaneJuridice from field CodUnicInregistrare. CodUnicInregistrare and NumarInregistrareRegComertului is text.
cant get it running. i got the same query running made in the querybuilder, but somethings change, so i need to adjus it in vba. But it doenswork, and get a type error
DoCmd.RunSQL "INSERT INTO tblAccessLog " _ & "(DateLoggedOut, TimeLoggedOut) VALUES " _ & "(#" & Date & "#,#" & Time & "#) WHERE " _ & "(LogID = '" & LogsID & "');"
Could anyone possibly tell me why this isn't working? Probably something stupid i've done bus still.
When i run it, I am getting the error message "Query input must contain at least one table or query" yet i've told it to use tblAccessLog so i'm just confused.
i've posted it as the sql string is built in the code
i get a 'catastrpohic error' when running it from vb like this and when i build put the string into a query and run it through the access user interface it worrks
I made a number of changes to a DB that was working fine (normalised further). So what's wrong? I have a number of forms (for my sample DB I have stripped down to just one, if I can resolve for this I can apply to others).
qryENTRY_COMPUTERS ENTRY COMPUTER FORM
The user adds a new computer then selects the Computer Make (qryLOOKUP_COMPUTER_SUPPLIER) & Computer Model (qryLOOKUP_COMPUTER_MODELS).
This now returns error 'recordset is not updateable'.
The query on which the form is based is incorrect (qryENTRY_COMPUTERS). Previously I was able to add tblSupplier & tblSupplierProducts to the query then add field ProductDescription fom tblSupplierProducts to the query. This allows users to select a value from cboComputerModelID (ProductID), field ProductDescription then displays the related descriptive value for the ProductID selected (value remain on screen when user naviagtes between records.
I have attached a sample database (access 2002-2003 format).
I am sure the answer is staring me in the face but I have now spent hours trying to resolve!!
Help very much appreciated. Phil.
Update: One difference I can see is that on the query 'qryENTRY_COMPUTERS' where i have added tblSupplierProducts & tblSupplier the join properties are in reverse i.e. Left Table Name = tblSupplierProducts Rigth Table Name = tblComputers Left Column Name = ProductID Right Column Name = ProductID ????
I am trying to create a form that has an unbound text box which row source is a field in a table. I have created a subform that gets the records from another table.
Both tables are linked in a one to many relationship. When a user selects a record in the cmbo box i want the table to show only those records which are related.
This obviously didnt happen. So i changed the subform instead of a table as its source but a query, then in the criteria of a query just set it to look at the cmbo on the form. After the cmbo was updated i got the subform to requery.
This worked fine, but i was unable to make any changes or updates but with no particular error.
When inserting a subform using the wizard i do remember coming across a section of a wizard that asks me if i would like to tie in the subform with something on the form. However this part of the wizard just doesnt show. Maybe i was using a different version of access for this wizard?? i am currently using Access XP.
Hello once again. I have been working on a small database that records all IT records (Desk Info / Software / License Info / Hardware etc...) Somebody out there might even find it useful!! Will post to DB forum when working :)
Where to begin. I thought it would be a good idea to normalize a little more........(still not 100% but an improvement). I seperated Software/License information. I now have tblSoftware & a tblLicenseDetails.
Basically the clux of it all centers around a form 'frmDeskSetup'. You can search via three methods (Desk ID / User ID or Computer ID). I would like to amend the Installed Software Form (last form on frmDeskSetup) to include the License Information.
I have also tried to create a query linking tblComputerSoftware tblSoftware + tblLicenseDetails. My idea was to create a form that would allow users to Add Software/ Add a License for that Software and then allocate the licensed software to a computer all from one form. The query run OK but would not allow data entry via the form!!
Sorry for the length of this post. I have attached a stripped DB for forum in Acess 2003 format. Thanks in advance, Phil.
What is wrong with this line? I am entering it in the following query:
ERName Group By Department Group By Date of Call-In Group By Type of Call-In Group By Count:ERName Count
The other thing I tried is just doing another query based on the above query and doing a totals (sum) line on Count:ERName. That doesn't work, it prompts me for count (as if that is a parameter I want to choose.
I am still learning access- I am hopeful someone does not mind helping me...no matter how easy or simple this may be. I will do my best to describe what I am trying to do.
I am creating a system admin database- starting from scratch and am willing to start over.
I would like to create 2 forms that work directly with the appropriate tables.
Table 1 (host/IP): Hostname IP address User - uses a drop down already created System - uses a drop down already created
Table 2 (system updates): Action- uses a drop down including install, remove, etc... Software- uses a drop down to select from including virus, system updates Date updated Comments
Form 1: -new record button (to enter new hostname record and IP associated) -find button -save button -Exit (database button) -Delete Record button) -hostname -IP address -user (drop down to change user if necessary) -System (drop down to select laptop, workstation, etc.) -"Add/update patch" button (which I would like to link to form 2 showing only the records for the selected host/IP on form 1) - "view all updates for this system" button (within last week or month)
Form 2: - Clear or undo button (which will undo any field entered by mistake on this form) - Save button - Exit (to main form) button - Hostname field which matches what is on form 1 - user field which also matches what is on form 1 - Next, there are four separate lines (as seen below)- each with the appropriate links to table 2. The purpose of the four lines is if the admin has four separate updates to be entered, they can do it on one page, click save and each separate will be saved and accociated with that hostname, IP. 1. Action - Software - Date Updated - Comments 2. Action - Software - Date Updated - Comments 3. Action - Software - Date Updated - Comments 4. Action - Software - Date Updated - Comments - System Admin field - this is to show who did the updates for the selected hostname/IP
Now, I seem to be okay with form #1 (except the "view all updates..." button) Form #2 is giving me a fit. I seem to be having problems populating all the hostname records that have been entered. Also, the four lines are not working independently.
Is it possible to have the date update field automatically update when action or software is updated/selected.
Perhaps I have the second form set up wrong due to the relationships or primary keys or I just did not configure the form correctly.
Sorry for the long message- I hope someone can help straighten me and/or this database out.
I purchased a copy of Office 2003, on Ebay, for less than half the price it normally sells for. I created databases, which work well on my computer. However, when I copy them over to the office computer from my computer, via Flash memory stick, the program does not run. The message seems to indicate a problem with registration. When I first installed Access, it asked me for a registration key, which I did provide. After that it worked-no activation process. Does this mean that you can only use the computer you created the database on to run it, or that I do not have a proper version of Access 2003? I cannot transfer, from my home computer, to the office computer. Is this Microsoft paranoia again? Subsequent uninstalls and reinstalls of the program did not ask for the installation key. What should happen? I would like to resolve this major problem and your help will be greatly appreciated. The program is unreliable. Also, Switchboard does not work-must use option box instead.
Time for you form experts to lend a hand.... what I have is 2 tables with queries based directly on them with no criteria and forms directly on the queries.
custtbl CustID ----Text-Primary Key Custname--Text-non essential just identifies customer
equiptbl CustIDFK - Text-Foreign Key EquipID -- Text -Primary Key EquipDesc-Text -non essential just identifies equipment
qucust CustID ----Text-PK Custname--Text
quEquip CustIDFK - Text EquipID -- Text -PK EquipDesc-Text
fmEquip CustIDFK - Text EquipID -- Text -PK EquipDesc-Text
On the button for fmcust, I have the following code: Code:Private Sub Command7_Click()On Error GoTo Err_Command7_ClickDim strid As Stringstrid = Me.CustIDIf IsNull(DLookup("custidFK", "equiptbl", "custidfk =' " & Me.CustID & " ' ")) Then strQuery = "INSERT INTO equiptbl(custidfk) Values('" & strid & "');" DoCmd.SetWarnings False DoCmd.RunSQL strQuery DoCmd.SetWarnings TrueEnd If Dim stDocName As String Dim stLinkCriteria As String stDocName = "fmequip" stLinkCriteria = "[CustIDFK]=" & "'" & Me![CustID] & "'" DoCmd.OpenForm stDocName, , , stLinkCriteriaExit_Command7_Click: Exit SubErr_Command7_Click: MsgBox Err.Description Resume Exit_Command7_Click End Sub Now, for an existing record, this pulls it up fine, but if the record doesn't exist, then I want it to create a new record in the equiptbl and pull it up in fmequip. I've done some error checking, and everything works fine up to the insert to part of the vba. I have a feeling it's something simple, but I'm too much into it to look at it objectively. (I've had a lot of distractions all weekend - dogs, kids, roommate, roommate's kids, I just want to punch anything that makes noise, lol)
Here is the sample I'm working with. Record 1 from the customer table is included in the equipment table, record 2 is not.
Edit: As it is, if the record doesn't exist in equiptbl, it pulls up the form with an entirely new record, everything blank, but I want the customer ID to populate the custidFK field of the equiptbl if the record doesn't exist in equiptbl (sort of autocompleting part of the new record if you will).
I am trying to do a partial duplication query. this is the code from the SQL view in accessSELECT filtered1.Company_NameFROM filtered1WHERE (((filtered1.Company_Name) In (SELECT [Company_Name] FROM [filtered1] As Tmp GROUP BY [Company_Name], Left([Company_Name],7) HAVING Count(*)>1 And Left([Company_Name],7) = Left([filtered1].[Company_Name],7))))ORDER BY filtered1.Company_Name;the table filtered1 has 1300 records, under the field Company_Name.the 7's apparently should get it to compare the first 7 letters, and if the same show me them. A whats going wrong, its not showing me any, asthough there are none, (which i know there are) and B. How would i get it to compare the first 7 letters across tables, with fields of the same name?thanksalex
all tables are 1 to many relationships with referential integrity. every contact can have many Authorizations every authorization can have many payment numbers many payment numbers can have many payments
all payments numbers created are based on the latest Authorization number. a single payment number will have numerous payments listed.
i have tried forms with qry, forms with tbl, forms with forms, sub forms, sub sub forms. i can get so far but then everything stops linking together. ive tried VB ( barr it i am better with Excel!! ) to open forms, link forms.
story. 1. my main form will show the current contact & all details.
2. i click a button and want to make a payment to them.
3. a form should open and automatically create a new payment number with a subform ready to receive payment details in a continuous form layout. i can then either press an apply button on the main form to save or a cancel button to completely cancel the payment number.
after this, i wanted to add a button on this form to add a new authorization number and refresh but i need to get over this hurdle first.
Please Please Please can someone guide me? the rest of my project is based like this so if i can understand how this can be done, i can move forward to complete.
Any help would be graciously received so i can at least move in a direction rather than circles!!!!!
I am trying to get colum "Age Group" in table "A" to autofill based off of info from colum "Age" in table "A" AND colum "Age" in table "b" and corresponding colum "age group" in table "b"
I am looking for table "a" to look at the value inputted by the user in the Age colum of table a..compare it to the age colum of table b and return the correct age group in the appropriate colum of table "a"
Now, I'm totally lost! When I create a query with the Query Design view in Access with this SQL query:
SELECT T_Cryzout_Disponibles.LCLCL_Disponibles_Total, T_Cryzout_Disponibles.DateEmission, T_Cryzout_Disponibles.NomReceveur, T_Cryzout_Disponibles.Ordre FROM T_Cryzout_Disponibles WHERE (((T_Cryzout_Disponibles.LCLCL_Disponibles_Total) Like 'C*') AND ((T_Cryzout_Disponibles.DateEmission) Is Null) AND ((T_Cryzout_Disponibles.NomReceveur) Is Null Or (T_Cryzout_Disponibles.NomReceveur)='')) ORDER BY T_Cryzout_Disponibles.Ordre;
everything is good, I get what I'm suppose to get. But When I'm doing it in VBA with this code:
RExtraction.Open "SELECT TOP " & NbrLCLCL & " LCLCL_Disponibles_Total FROM " & QuelleTable & " WHERE (((LCLCL_Disponibles_Total) like 'C*') AND ((DateEmission) Is Null) AND ((NomReceveur) Is Null)) ORDER BY Ordre", ConnectionBD, adOpenStatic, adLockOptimistic
RExtraction.MoveFirst
It gives me an error that says: BOF or EOF is egal to True.
And I really don't know what is wrong with this. It is pretty much the same as the query I entered in the Query Design.
I am trying to calculate the total number of days between a date (i.e, csdate) and todays date in a Query for a Report. I have tried the DateDiff command in the query line and in an unbound box on the report but it is not returning the right values. Can Someone tell me what I have done wrong. I have checked that the date is in long format and tried it in short format as well with the same results. Below is what I have tried. csdays:=DateDiff("d", [csdate], Date()) I have tried the Now() command as well, but it is not right either. Please help!