I have a search form (continuous) which filters results from the main table. I can then double click on one of the filtered results to open a new form (single) showing all the fields for that entry. Fine so far.
My question - There are ten different types of operation that can be displayed, all with slightly different relevant fields.
Which of these methods is more efficient:
1. Make ten custom made forms (the correct one displayed depending on the selected operation). - Easy to do but needs ten forms.
or
2. Have one form with all the fields added (only the correct fields made visible by code). - Complicated code.
Please be patient with me.. really a beginner here. Thanks. :)
Here is my question: I have multiple tableS (and by multiple, I mean a LOT of tables.) They are all similarly designed, with mailing addresses of potential customers. They were all entered at different locations and different timing. What I want to do is to take out all customers from a particular country at one go. The simple and tedious way is of course to merge ALL the tables then run a query. But is there a simpler way?
Somebody wrote me a SQL thingy, that helps me remove all the duplicates, so that is not a problem. But the merging of the tables is too tedious considering the number of tables involved. I myself have around zero knowledge of SQL, but if the solution is in that direction, please let me know, and I will find someone who can help figure it out.
Well, today I had a problem with my main access db. It stopped letting me create MDE files, and my usual trick of decompiling it didn't work. I eventually got it working by importing everything into a blank database and setting the startup form and references again. However when I did this, I noticed a very big difference in file sizes. My old MDB file was 14mb, while the new one was about 5mb.
Just wondering if anybody else has come across anything like this before? Everything seems to be working fine and transferred over corrrectly, but such a huge difference worries me slightly.
I am trying to form a join between two separate databases. Database 1 has a column (Gene_Name2) that consists of common names of human genes. In this database there is only one name for each gene per field. The other Database 2 has a column (Gene_Name2) that has various names for the same gene in each field. Most genes have been given different names over time. I want to join the databases into a separate query database so that all of the information in Database 1 is retained and only when the name in Database 1 matches one of the names in Database 2 does the row of information get tacked on to the query database. The problem is that in a normal query the text in both Gene_Name columns do not match and the query returns no matches. I have tried Instr and like criteria statements with no luck.
In this database, there is a table of users (name, address, phone, etc.) There is also a table of 35 groups. Each user may be in any combination of 1 or all of the groups. The list of groups is not static. At any point in time, I need to be able to show that Bob is in groups 1, 19 and 35. All I can think to do is list all 35 groups in the user table, then make each one a yes or no field. HELP! There’s got to be a better, more efficient way.
I have been working on a Query to sort through a list of companies. I am trying to query the company name to include ALL entries that have the include key(from another table) anywhere in their company name... It is supposed to exclude all entries with ONLY the exclude key(from another table)... If it has the exclude key AND the include key or neither key then the entry should be included... Then it is supposed to use all of the entries added from the previous sorts and include ONLY the entries where the zipcode matches one from a ZIPCode list.
Below I have listed the tables with their variables and my attempt on the query:
Include Table (tblinc) ID Inckey
Exclude Table (tblex) ID exkey
List Table (list) ID Company Address City State ZIPCode …
ZIPCode Table (ZIPCode) ID ZIPCode
Query withZips <--- my attempt... doesnt work 100% ALOT OF REPETITIVE ENTRIES
SELECT DISTINCT tblinc.inckey, tblex.exkey, ZIPCode.ZIPCode, * FROM ((list LEFT JOIN tblinc ON list.company Like "* " & tblinc.inckey & " *") LEFT JOIN tblex ON list.company Like "* " & tblex.exkey & " *") INNER JOIN ZIPCode ON list.ZipCode Like "*" & ZIPCode.ZIPCode & "*" ORDER BY inckey DESC , exkey;
This has become urgent... If you can help, please respond asap...
I have an input form that has many fields, how do I go about fragmenting the data collection.
I thought I might group related data fileds together ie personal details, contact details and have a separate form for each data grouping or one form and make the fields invisible after they are filled in and then make the new data group fileds visible ie overlaying them so it appears to be a new form. I am not sure and would appreciate guidance.
I'm trying to find the best way to organize a report that will have ALOT of fields for an individual record. Because it is for an individual record not a group of records (and I want it to be dynamic) I'm thinking of doing a filter & query to fill in report with necessary details. This report is going to contain ALOT of fields, even the wizard that I used based on the query said that there were too many fields, but I can't cut down.
I wonder if someone can help with what must be an easy solution to this problem.
I have a table with 350,000 records, but without a unique identifier field. I just want a simple incrementing number field to become the primary key but dont know how to add this in. I cannot add an autonumber as there are two many records - it falls over.
Ive tried exporting it all to excel, but as well as being cumbersome, something went wrong and so I'm back to square one.
I think there must be a way to add an incrementing number either via a query or in VBA but I dont know how. Please can somebody provide a solution.
I've been trying to figure a way to minimize my code in a module. I currently have three function built excalty the same way to work with three different forms. Each textbox in all the forms are named the same now what I'm trying to do is have the function identify which form called the function and where should the data be.
Code: Dim frmCurrentForm As Form Set frmCurrentForm = Screen.ActiveFormMsgBox "Current form is " & frmCurrentForm.Name
Once that is found. have something like this.
Code: Select Case frmCurrentForm.Name Case 1 WorkForm = Form1
Case 2 WorkForm = Form2
End Code: WorkForm.NameField = "John Smith"
No matter if all three forms are open the data should only go to the one that declared the function.
Code: Private Sub Check237_Click() If Me.Check237.Value = "yes" Then Me.Text239.Visible = True Else Me.Text239.Visible = fasle End If End Sub
I am using the code above and what the desired action is when the Check237 is checked then the Text239 is visible for the user to put in a comment. However, as of now when the check237 is checked the textbox dissapears.
Hi, I have the following situation. I have a switchboard form which has 2 buttons (Add And Edit) I have a patient record form, which has 2 fields, (DateRecCaptured and DateRecUpdated) Both buttons on the switchboard open the Patient Record form (one opens it in Add mode and the other in Edit mode)
This is what should happen. If I click on the add button on the switchboard, the patient record form should open to allow me to add a record. The system date should then automatically be saved in the DateRecCaptured field. If i click on the Edit button and edit a record, the system date should be saved in the DateRecUpdated field. If no updates are made, the field shouldn't be updated. If you scroll among records, the DateRecUpdated field shouldn't be updated. When editing, the DateRecCaptured field should remain unchanged.
I have a form I use for data entry, it needs to generate an id called RO Number and i need it be generated by access starting at number RO129036 and then keep adding sequentially, so RO129037 etc etc.
as i already have data in my DB that i need i cannot just reset any fields
having a table with just one field - the numeric part of the RO number so first one would be 129036 - so i need the form to pull this field, add 1, and then add "RO" at the beginning of it? i have really been struggling with this database
Can you have a saved (unsorted) query as a row source for a combo and then add some code to enable the combo to sort the list?
Reason is, I want three combos to use the same query for finding records in different ways, but need the query to be saved, not a query built by the query builder that access takes you into from the row source on the combo data tab?
I only need the data listed in each of the combos to be sorted by one column in each of the combos.
Have seen something about bubble sorting, but not sure if this is OTT or even could be applied to this?
So in my database i'm creating a live form that will open up a list of patients and when they are seen. one of the bits is a button that before they arrive says "Not Arrived" and after they arrive it says "Arrived". The code works fine:
Code: Private Sub Command68_Click() Dim C1 As String Dim C2 As String
[code]...
The problem is after clicking the button on any of the records, it changes the text on all records, to wit: I tried to attach images or links to images, but my post-count is too low. The before-click screenshot is /3QnBkgG on imgur. The after-click screenshot is 9VZWzzp on the same site.
Bear in mind I've only clicked the button (it's white, so it doesn't look like a button) on the top record.The form is set to continuous forms, not sure if that has anything to do with it.how I can get the code to run on individual records, rather than applying the first-record's results across all records?
I'd like to do the following: when the user does something on Form A, Form B has to be open and the Forms should be located on the sides (Form A to the left side, Form B to the right side) of the display so the user can see them at a time.
However both Form A and Form B has an automatic centering function set when used alone.
Is there a way I could push this from code? I can't fine anything like that among the form's property.
I have a form in which job times for individuals is entered. As the data is entered, a macro fires to calculate various costs (Nat Ins/Pension/Total cost etc etc), and that data is stored in a table.
I now have written code to enable the inputting of the data into the database directly from the Excel sheet in which the data is first entered - this is great as it cuts out a data entry repeat and will be a big big time saver.
I currently have two forms. One being my main form and the other being a pop-up form to update e-mail addresses. On my main form, I have a button that is currently programmed to generate several e-mails. Before those e-mails are generated, I would like the pop-up form to appear asking for any updates to e-mail addresses. Once the pop-up form is closed, I would like the code on my main form to continue.
In the initial Form_Open code there is a string that fails before the form is open, preventing me from opening the form and accessing the VBA code to correct the problem.How can I access the VBA code to correct the problem if it otherwise prevents me from opening the form so I can access the VBA code?
Private Sub Save_Click() If IsNull(cboEmpName) Then MsgBox "Please Select Employee Name" Me.cboEmpName.SetFocus End If If Me.txtNoofDaysWorked.Value = "0" Then MsgBox "Please Enter No of Worked Days"
I have an order form that auto-populates details from the customer table into adderss and contact controls. But I don't want it to auto-populate when the underlying order table already has data in the related fields. Here is the code I use on Load form event...
====== Private Sub Form_Load() 'Use this version if the ID is a number Dim x As Variant Dim strControl As String Dim lngID As Long 'If parameters exist, use them If Len(Me.OpenArgs) > 0 Then