473,472 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MS Access Not Displaying Fields on Form

1 New Member
MS Access 2002 SP 3

I have two forms, one with a combo box looking at available lookup tables and the other an unbound form which will be used by the user to update lookup values.

The lookup value tables all have the same format: ID, Value, ValidFrom, ValidTo

The code I use to get the form to look at the correct lookup value table is:

Dim db As Database
Dim tdfTable As TableDef
Dim strTableName As String

strTableName = Me![cmbLookupTables].Value

Set db = CurrentDb()
Set tdfTable = db.TableDefs(strTableName)

If IsNull(Me![cmbLookupTables]) Then
MsgBox "No selection."
Else


DoCmd.OpenForm "frmLookUpTablesAdministration"

'Get the fields for the SQL query
Dim strID As String
Dim strValue As String

strID = tdfTable.Fields(0).Name
strValue = tdfTable.Fields(1).Name

Forms!frmLookUpTablesAdministration.Caption = "Edit List for " & Me![cmbLookupTables].Column(1)


Forms![frmLookUpTablesAdministration].RecordSource = "SELECT [" & strID & "] AS tblID,[" _
& strValue & "] AS tblDescription,[" _
& strValidFrom & "],[" _
& strValidTo & "]" _
& " FROM " & strTableName & ";"
Forms![frmLookUpTablesAdministration].Requery
Forms!frmLookUpTablesAdministration.Repaint
Forms!frmLookUpTablesAdministration.Refresh
End If


The values on the edit form are being set correctly and the correct number of records returned. However, the fields are not visible (have checked the visible property is set to yes) even though in the properties window I can scroll through each field and check the properties have been set correctly.

Any ideas where I am going wrong?
Oct 26 '06 #1
1 2055
PEB
1,418 Recognized Expert Top Contributor
Hi,

You need to set the control properties of your fields to visualize your data..

Each field has own name!

So

Me!Field1.ControlSource=/the name of the field from your table def/


:)
Oct 27 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: euang | last post by:
Hi, I have been using access 2000 for two years on WINDOWS NT to display dynamic aweb page using ASP My ISP has now changed to Windows 2003, and I am having major problems displaying...
3
by: hi | last post by:
Hi, Is there an IRC channel for help with access? I've created a form with some fields from several tables. When I go to "Form View" the fields I created with the wizard along with several...
5
by: Robert | last post by:
Hello Accessors I have some reports created in Access that are very good for what they do. However, it seems to me that when you are displaying information you don't need to print out that a...
3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
21
by: Madingo | last post by:
I have been using Access 2003 for about a year and I am trying to find out how to create a web test environment to try and transition some of my Access applications on to the web. My stumbling...
6
by: Jack | last post by:
Hi, I have an Access application which need to be converted to asp-sql server application. This Access application uses a single form. This form has got a SS number with names and age. The form...
7
by: PW | last post by:
Hi, I have a form with unbound fields on it. The user selects a record from a recordset and I populate the unbound fields. When I try to change the unbound quantity text box, Access 2003 tells...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
0
by: John Kirkpatrick | last post by:
Hi all, I am having difficulty displaying records on a frontend MS Access 2000 form using a MySQL backend. The following code works well with the Jet database engine but doesn't work properly...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
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...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.