Hi,
I've got two fields in seperate SQL tables (a and b), both called trackNum.
b.trackNum is a foriegn key into a.trackNum. I've got a form with a few
bound controls on it (textboxes specifically), one of which displays the
trackNum from the query "SELECT a.*, b.* FROM a, b WHERE a.trackNum =
b.trackNum". All of the controls are displaying their data correctly except
txtTrackNum, which is always displaying the digit 1. If I change my query so
that it only selects trackNum from a everything is hunky-dory. Anyone come
across this behaviour before?
PS. I thought I could fix it by binding txtTrackNum to a.trackNum, rather
than just trackNum, but then it complains it can't find that field.
Thanks,
Rowland. 2 1749
Have you tried aliasing the field? "Select a.TrackNum as Track_1,
b.TrackNum as Track_2..."?
David
"Rowland Banks" <ba*****@hotmail.com> wrote in message news:<cd**********@sparta.btinternet.com>... Hi,
I've got two fields in seperate SQL tables (a and b), both called trackNum. b.trackNum is a foriegn key into a.trackNum. I've got a form with a few bound controls on it (textboxes specifically), one of which displays the trackNum from the query "SELECT a.*, b.* FROM a, b WHERE a.trackNum = b.trackNum". All of the controls are displaying their data correctly except txtTrackNum, which is always displaying the digit 1. If I change my query so that it only selects trackNum from a everything is hunky-dory. Anyone come across this behaviour before?
PS. I thought I could fix it by binding txtTrackNum to a.trackNum, rather than just trackNum, but then it complains it can't find that field.
Thanks,
Rowland.
That works great, thanks. I ended up using SELECT a.*, b.field1, b.field2,
etc. but I will definitely use your suggestion in future. I never knew you
could alias fields as well as tables. Thanks.
"David" <dh*******@chestnut.org> wrote in message
news:83**************************@posting.google.c om... Have you tried aliasing the field? "Select a.TrackNum as Track_1, b.TrackNum as Track_2..."?
David
"Rowland Banks" <ba*****@hotmail.com> wrote in message
news:<cd**********@sparta.btinternet.com>... Hi,
I've got two fields in seperate SQL tables (a and b), both called
trackNum. b.trackNum is a foriegn key into a.trackNum. I've got a form with a few bound controls on it (textboxes specifically), one of which displays the trackNum from the query "SELECT a.*, b.* FROM a, b WHERE a.trackNum = b.trackNum". All of the controls are displaying their data correctly
except txtTrackNum, which is always displaying the digit 1. If I change my
query so that it only selects trackNum from a everything is hunky-dory. Anyone
come across this behaviour before?
PS. I thought I could fix it by binding txtTrackNum to a.trackNum,
rather than just trackNum, but then it complains it can't find that field.
Thanks,
Rowland. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: James Fortune |
last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't
understand why people who know how to write code to completely replace
a front end do not write something that will automate...
|
by: Abhi |
last post by:
FYI:
This message is for the benefit of MS Access Community. I found that
this prblem has been encounterd by many but there is hardly any place
where a complete solution is posted. So I thought...
|
by: vulcaned |
last post by:
Hi All,
Hopefully I explain this well........
In Access97 I have a form which has a tab control on it, each tab has a
sub-form which is bound to its appropriate table(I'll call them
'Detail'...
|
by: MLH |
last post by:
I have a form, bound to a query. Its RecordSource property
is a query named frmEnterLienAmounts. The form has a few
bound controls and some unbound controls. The unbound
controls are calculated...
|
by: H5N1 |
last post by:
Hi there
First of all excuse me posting such simple (I guess) question, but I
didn't find the answer in tutorials.
I have a formView presenting records from some table. one of the fields
is...
|
by: HP |
last post by:
Hi there
I have a datalist control with some bound controls in its Item Template
and a gridview bound to one of those fields (residing also in Item
Template).
I've found out that when I click...
|
by: Rico |
last post by:
Hello,
I have an MDE application where I use a bound object frame to display an
image. This frame is updatable and bested on the contents of an OLE field.
My problem is, some images display as...
|
by: njb35 |
last post by:
Hi all
I'm beginning my foray from VBA into VB 2005 Express, and enjoying
some of the efficiencies it provides! I'm stuck with some dataset
handling however that I _think_ can be automated but...
|
by: Jonathan Wood |
last post by:
I have a databound dropdownlist control. Based on some other criteria, I
need to specify the selected item in my pages Load event.
The problem is that, in my load event, the control does not yet...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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...
|
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,...
| |