Hello. I am new in Access and I need assistance from Pro's
I have a data entry form from 2 main tables and they have relationships with other tables.
My main table only contains Field ID's, because all of these fields are referenced from other tables.
On my form, these fields are Combo Boxes, wherein you can add/select from the list to populate the table.
All works fine, except I would like to create a combo box to find records based on my current form. But because the form came from a table that contains ID's only, the combo box lists only ID's.
My question is, is there a way to populate the data in the combo box that would reference the actual data from another table, and once its selected from the combo box, that the form will show the data associated?
Ex. Table1 has Fields RoomID, BuildingID, LocationID, AreaID.
then I have tblRoom (roomid, room), tblBuilding (BuildingID, Building), tblLocation (LocationID, Location), and tblArea (AreaID, Area)
The reason why I have it like this is because of the search combination that we need to make after. I already have a query based from all of those tables and I have a form to select the data needed for us to print.
but updating the data entry form takes time as we click back/forward on the recordselect.
Pleae help! I have been searching for answers and really could not find one.
Thank you in advance
7 3323 NeoPa 32,556
Recognized Expert Moderator MVP
ComboBoxes can have multiple columns. It is perfectly possible to have a ComboBox, bound to your ID field, which displays other details from the table (in our example case [tblRoom]) but saves the ID as the value of the ComboBox. The ID column itself can even be hidden if you choose.
Does this answer your question?
Can you possibly show me how to do it?
NeoPa 32,556
Recognized Expert Moderator MVP
If you can narrow down what bit you don't understand. As it is the question is too open-ended for that to be practicable. You're really expected to ask for help when you've tried what you know. That way the questions are more specific.
I think I've given you something to start from, even if you are really new to Access. Have a try, and let us know what you struggle with, if you do.
what i've done so far is to place a combo box on the form and use the fields from my form as the rowsource. i've been researching just to give me an idea on how to start but i did not find any to start with. i'm sorry but this is the best i could do for now.
this is what i've done so far and i honestly lost
create a new query from the table that contains only ID's
i've added also the other fields from other tables related to the main table with ID's
so now on the query i have : - [tblroomlist].[room]
-
[tblbuilding].[building]
-
[tblfloor].[floor]
-
[tblarea].[area]
-
[tblData].[roomid]
-
[tbldata].[buildingid]
-
[tbldata].[floorid]
-
[tbldata].[areaid]
on the data entry form, added a combo box, source = new query
added code to the combo box using recordsetclone - private sub combo73_afterupdate ()
-
dim rs as object
-
set rs = me.recordsetclone
-
rs.findfirst "[room] = '" & me.combo73 & "' "
-
if not rs.eof then me.bookmark = rs.bookmark
-
end sub
i really need help. please tell me how to populate a combo box or use a recordsetclone so i could select from a combo box that would appear on the form and will make things easier for me to update entries instead of clicking back/forward
thank you again
NeoPa 32,556
Recognized Expert Moderator MVP RG360: I've been researching just to give me an idea on how to start but i did not find any to start with. i'm sorry but this is the best i could do for now.
OK. I'm not here to judge how advanced you are. If you don't get very far on your first attempt than that is not an issue. Just that you make the attempt. RG360: What I've done so far is to place a combo box on the form and use the fields from my form as the rowsource.
You may have to help me a little here. I don't understand what you're trying to express. Forms don't contain fields. They contain controls. Forms are however connected to a recordsource which contains fields, and controls are often bound to underlying fields. Perhaps it would be easier at this point if you posted the RecordSource of the form, and the RowSource of your ComboBox control, in here for us to have a look at.
NeoPa 32,556
Recognized Expert Moderator MVP
From your post #6 I see there are a few points to bring up. These should help you in dealing with us on the forum as well as help you generally in your work : When posting any code on here please :- Ensure you have Option Explicit set (See Require Variable Declaration).
- Try to compile it. If it doesn't compile for any reason please explain that clearly - including the error message and which line of your code it appears on. Compilation is done from the Visual Basic Editor menu - Debug \ Compile Project (Where Project is the actual name of your project).
- Copy your code (using the Clipboard - Cut / Copy / Paste) from your project directly into your post. Typing in code is not appreciated as it is likely to introduce typos which cause members to waste their time unnecessarily.
- Ensure that the code in your post is enveloped within CODE tags. The hash (#) button in the posting page helps with this. Simply select your code and click on the hash button to have it enveloped automatically.
If all these points are covered then all members will be better able to understand, and therefore attempt to answer, your question. Sign in to post your reply or Sign up for a free account.
Similar topics |
by: webhigh |
last post by:
I¹m not sure if this a PHP question or an MySQL question but here it goes.
I have a repeat region of a table called userid
What I¹m trying to accomplish is being able to edit the record and...
|
by: FZ |
last post by:
Hi Gang,
I was wondering if a generous person might be able to walk me
through what I believe is a pretty simple task. I actually have
significant Access experience, but I haven't done it in...
|
by: Brian Andrus |
last post by:
Ok. I upgraded to MS Access 2003 recently and now I am having great
heartache.
In Access 2002, when I opened a table to view the data, there were
wonderful little "plus" signs that I could click...
|
by: Gerry Abbott |
last post by:
Could someone please tell me is there a simple way to refresh a table open
in standard table view, without having to either close and re-open, or open
in design than back to datasheet view.
Many...
|
by: Filips Benoit |
last post by:
Dear all,
How can i populate a combo with the field-caption-names of 1 table?
Thanks
Filip
| |
by: Wolfgang Kreuzer |
last post by:
Hi,
I am starting to migrate an Access 2.0 application to Access 2000 (I
know it's not the latest version, but ist supported in our company).
I found some funny behaviours where I could not...
|
by: Deacon Dan |
last post by:
I want to be able to keep the current form on the current record. That
is, the arrow key, the tab or the enter should not cause the form to go
to next record or previous record. Preferably loop...
|
by: herbiegrey |
last post by:
Hello
This is my first post on the forum so hello everyone.
I have a problem with access that I can't manage to view the current form record as a report ready to be printed.
I have a list...
|
by: jthep |
last post by:
Hi, I'm a newbie at this but how can I populate a table with data from other tables by using INSERT statements? Below is of what I have so far, I have to populate the PERSON_PROFILE table. I've...
|
by: kcdoell |
last post by:
Hello:
I have a continous form that displays various forecasting records that an End user can add or edit the records (this feeds off of a query that I created called "ReQryForecast"). On that...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |