ok, here goes...
sorry if this is really simple, i just can't figure out how to explain exactly what i'm trying to do...
first of all, i have a list box populated by a table, when i click my button, i want to create a record in the table (done). then i want to display the id for that record in a text box. this will allow me to update the record, which i have also worked out. i just can't seem to figure out how to display the id from the table.
Thanks for your help
*j
I am trying to make a courses registration database. I have 3 tables; tblContacts [ContactID], [FitstName], [LastName] [Etc..] [Etc..] tblCourseRegistration [RegID], [ContactID] [CourseID] and tblCourses [CourseID], [RegID], [CourseName], [StartDate], [AvailablePlaces] I have created a form called Test1 that displays The CourseID, CourseName, StartDate EndDate and an unbound textbox called PlacesLeft. I would like to display in this text box the number of places that are still available on a particular course. I've written a querie that counts the CourseID's in the course registration table this works ok but I want it to place the value in the PlacesLeft text box. Then I can do a simple calculation based on the PlacesAvailable textbox. Anyone any idea how to do this My querie reads SELECT Count([CourseID]) FROM tblCourseRegistration WHERE (((tblCourseRegistration.CourseID)=(Forms.Test1.Co urseID)));
I tried another method which includes a command button that when clicked tries to run the following Dim MyRS As ADODB.Recordset, strSQL As String
Set MyRS = New ADODB.Recordset strSQL = "SELECT Count([CourseID])FROM tblCourseRegistration WHERE (((tblCourseRegistration.CourseID) = (Forms.Test1.IDNo)))" MyRS.Open strSQL, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
If MyRS.NoMatch Then Me.PlacesLeft = "" Else Me.PlacesLeft = MyRS.Fields(0) but Access (Ver 2000) does not like the noMatch and shows it as an error. I would be very grateful if someone could show me how to sort this out!
May I start by saying Hi and that im just embarking on understanding Access 2003. I do know a little about DB as I have built programs in VB6 using databases. But now onto my problem which seems a simple one.
I have a Db called delivery. With columns as below. Mtno being the key.
Mtno Orderno Description Quantity Customer
I populate a combo box with Mtno, but on the click event of the combo box i wish to populate textboxs from the other columns.
Hello I hope someone can help me on this one. This is something I am not getting an understanding on and need some help.
I made a form that holds all information for our customers. I want to make the Company Name box into a combo box so when I change the Company Name in the combo box it populates all the text boxes on the form with the correct data.
I for the life of me do not know where/how to even start to do this.
I would attach my database but I cant seem to get the file small enough. I have deleted the large table and it is still 7megs. How do I get it small enough to attach it?
I'm pretty new to this type of programming and i was hoping for a little help,
I have completed the majority of my program it's just a few little things i need to tweak.
The main thing is that i am trying to get a text box to autofill from a selection in a combo box i.e.
i have selected a drop down box with 3 coloums looked up from another table i would like 1 of the columns to stay in the combo box after selection and the other two to appear in the text boxes on the same page.
i have build a small project using access 2003 and vba code one of the forms contains sub form the main form contain the main data about school and in sub form populate different > textboxes for details about classes my problem is how to fill these text boxes in this sub >form for different grades depending on id of main form and how can i change the values and >moveing first or next buttons these are simple picture
I have five textboxes for husband with the values typed(HustxtAddress1, HustxtAddress2, HustxtCity, HustxtState, HustxtZip). I have five more textboxes for wife. I have a combo box asking whether the spouse's address is same as the husband - with yes or no. If "Yes" is selected, the text boxes for wife is auto filled with the same values of the husband. I tried with combo box change event setting HustxtAddress1= WifeText address1, it fills only the first field and other fields are empty.
is there a way to have a form set to either auto populate fields based on the FIRST FIELD? For example: if the user type in the STUDY ID, the other fields like (first name, last name etc..) are auto-populated/auto-filled? and if the STUDY ID is new and not in the table, then the users simply fill in all the fields/complete the form and save? And I would also like a message box to show when I am typing the STUDY ID that would say something like: this person is on the system already. Click YES for this person and NO to add the user?...
I have dependent combo boxes which is working fine what i want is to select the value from the list and the text box should be filled in my case it is attachment field i want to fill up the value based on combo boxes selection.I have attached the database also.
I would like the remaining part of my text control to show stars e.g control value is 12 it shows *************12 control value is 3567890 it shows *********3567890
My text control does not have a fixed width, this is set in code depending on various factors Thanks
This is my first post of hopefully many, and I hope to be able to keep visiting and helping others in the future.
I'm building a database at the moment which I've done basing forms on Queries as I'm very familiar with doing so. However, one form in the database if a bit different.
The form in question is for shipping off refurbished units at the warehouse, by adding a SHIP ID to the record for each unit scanned in. The form before creates a recird ubdexed by a SHIP ID in the SHIPPING table, along with some other info such as delivery address and ship date. Each unit will be assigned this SHIP ID by the child form I wish to create, by scanning the Serial Number against it. Two actions are done on the child form: Read in Serial Number of unit, find record in MAIN table and display key fields such as the units status (i.e. "WIP" or "REPAIRED" into text boxes on the form Allow unit to be shipped (by assigning the SHIP ID to the unit's record in the main table, only if the STATUS field shows as "REPAIRED" Now, because I want to scan units into the form's Serial Number textbox and do the STATUS field check, then assign the SHIP ID; I need a recordset, right? I've inherited development of datdbases which used recordsets in their forms before, but have never had to create one from scratch. Also I wasn't able to take a copy of the source code of those databases before I left my last company.
Can anyone give me some info on what the bare minimum is to create a recordset, and to use it to save the record once I've made changes.
For your info I would consider myself an Access intermediate, and I've worked with it in various roles and versions for around 5 years.
GOAL: select the IC number from the combo box and have 5 text boxes auto fill.
I have a table made for the IC number drop down. The columns represent the fields that need to be auto filled.
Making some kind of query to link the combo box entry to the text boxes? Some VBA where the control source is equal to my query? I have tried changing the text box control source to equal columns from my drop down but that did not work.
NOTE: the blue font in the first image represents the text boxes that need to auto fill when I select the IC number from the drop down. The second image is my table from which my combo box is generated. The acronyms are for the two tests on this form.
I have a combobox on an unbound form. After making a selection, I click a command button which opens a bound form to a new record. What I need to code next or add into the macro, is for the selection of the combobox to fill in the contact id, and contact name in the correct text boxes.
The combobox row source is: SELECT qryPBS.ConID, qryPBS.PBSName FROM qryPBS; bound column 1.
1) How to auto fill in a text box if you select a value from the last of 4 cascade comboboxes.
I have 4 comboboxes where
1 = Apparaat - cboApparaat 2 = Type - cboType 3 = OS - cboOS 4 = Probleem - cboProbleem
With all 4 comboboxes I have the vba code Me.cbo[name combobox].Requery
If I select the last combobox, cboProbeem. I want the textbox underneath to automaticly fill in the solution of that problem. I already tried to use the following vba code
Me.Oplossing = Me.cboProbleem.Column(5)
But it does not work.
2) I want to make a form for customers, where I can fill in customer info, device info and date when there contract started. Now I want to use SUM to fill in the end date of there contract.
MAIN TABLE Job_No - Looks up Job table Source - I want this to be automatically filled from the record associated with the job number from the Job table Test_Result - Looks up Result table PASS/FAIL etc Technican - Looks up technican names table
I have a table being filled everyday that contains the following:
ID EntryDate Ward_ID (linked to the Wards table) Census
At present, the data encoder manually chooses the ward via drop-down list to identify the ward, and fill the census field. Since we have 20 wards, we find this exercise eating our precious time (since we have tons more of data to enter aside from the census). I'm wondering if there's a way to automatically list all the wards in the table in a specific date, so that the encoder would just proceed in filling the census per ward.
One idea thrown was to design the table like an excel sheet (each ward has its own column). Another idea was to make individual tables per ward and make a default value for the ward_id. However I think these two are not the right directions.
First of all there is a table called "tblParTeam" wich contain the teamname and ID of teams partissepating in a certain Tournament. The tournemant data is kept in the table tblTournament.
Each tournament contains a couple of variables: "Number of teams per tournament", "Number of Rounds" wich reside in the tblTournament.
Here is the thing. I also have a form based on the tblTournament. Each tournament had a number of partisipating teams (stored in the variable "Number of teams per tournament"). Then I have a table called tblTournamentDetail wich containt the Tournament_ID, TeamPro_ID (looks in the table "tblParTeam"), TeamContra (also looks in "tblParTeam").
When I pusch a button on my form, wich is based on the tblTournament, tblParTeams and tblTournamentDetail, I would like the X (Number) of particepating teams to be filled in randomly in the tblTournamentDetail.
Lets say I have 10 teams I want 5 to be filled in randomly in the TeamPro_ID and 5 in the TeamContra_ID. How do I go about this?
Ok Ive looked and looked and read a multitude of threads to no avail. Please help me on this one.
I have imported a table into Access, I had no control over the original format of the table so Im stuck with the data as it is in that original doc.
So as it sits now in access.. index mnem client name -------------------------------- 1 310055 blah foo 2 blah2 john 3 blah4 joe 4 310099 grr12 bob 5 blah2 john
etc. * about 50,000 literally in size.
Looking at the empty cells in the 'number' column I need each of those to be filled. to end up with: index mnem upin name ------------------------------- 1 310055 blah foo 2 310055 blah2 john 3 310055 blah4 joe 4 310099 grr12 bob 5 310099 blah2 john
I did this once in VB/excel but it was prohibitively slow. Im positive there is a better SQL/Access solution but just cant quite get it. My best effort to date is: DLookUp("[mnem]","upin","[index]=" & [index]-1) criteria mnem Is Null In an update query updating mnem.
Downside all I get is say there is a block of 4 empty spaces in a row before the next mnem comes along, only 1 cell will be filled per run of the query.
i.e. index mnem upin name ------------------------------- 1 310055 blah foo 2 310055 blah2 john 3 blah4 joe 4 310099 grr12 bob 5 310099 blah2 john
I figure #3 is somehow looking up at #2 before its updated and taking that empty value. ..just cant figure a way around it though.
I know this has been done before but no matter how much googling and forum diving Ive done I havent found something to specifically address this.
I have a VB6 form that I want to fill with data from a field in an Access DB. I get the connection and the first field, but want the whole column to show up as the combo box items so that one can be selected, then when saved, populate and/or update another Access table. Can anyone help me cause the whole column to display instead of only the first record? TIA--Ed
1 Master Input Table. 1 Job Lookup table - (contains Job Number and Name)
When in-putting job details into the Master Input table i would like to enter the job number only and have the job name appear automatically without running a query, much the same as a 'vLookup' command in excel.
Its been a long time since I did dB work - stopped back in the days of dBase IV.
Still, using Access 2007 is not that difficult - except right now. I have 2 tables; one with customer contacts, the other with project details. Heres what I want - hopefully someone can help:
Within the project table, select from a lookup into customer contacts a name, which then auto fills in the fields for phone and email in the project table. I want to do this in the table or form, but have the data deposited into the table for sure!
I would like to use several forms to build one record in a table.
Form 1 with ask for details about one aspect of the client such as personal details.
I will then need a next button and it will go to form 2, summarising what has been inputted and now asking for the next lot of details such as their requirements.
I am guessing I could have 2 separate tables for the details and link the 2 but I have inputted lots of data already and I want to use that table as the source.
The main bit I am concerned about is when I go to form 2, how will it know to relate to the client I put in form 1?