2 doubts

cnuhima, could you repeat the error message you get ?
 
Hi,

When I put the above query in the expression builder it does not show me any error..but it just shows me #Name when i run the form..


Thank u
 
Maybe try something like this:

SELECT [FullName]
FROM [Order]
WHERE ([OrderNo]=([Forms]![Quotation].OrderNumber));
 
I had the same error today and the solution for me was the syntax. Maybe try to put "Order" between "[]" ?
 
Hi,

If i write the above one its not accepting it and showing a Msgbox with

The syntax of the subquery in this expression is incorrect and check the syntax of the subquery and enclose it in paranthesis..

If i give in the below manner it would not show any error but gives me #name? when i run the form..


=(SELECT [FullName]
FROM [Order]
WHERE
([OrderNo]=([Forms]![Quotation].OrderNumber)))

Thank u very much
 
try

=(SELECT [FullName] FROM [Order] WHERE ([OrderNo]=([Forms]![Quotation.OrderNumber])))
 
Hi guys,

i am not able to understand wht is the problem..nothing is working out..
 
Hi Guys,

I tried in all the ways..let me know any other ways of getting it..

I need it ..
 
Hi guys,

Can't we do the same using code in access..If Yes pls let me the know the code..
 
I have noticed that Quotation has been spelled in different ways. Check the actual NAME of the control and compare it to the query to Verify that there is not a msispelling
 
i am writing the correct name...i checked it..but i am not getting it.
 
Can you post an example of the DB?

in the first combo box, Can't you use the wizard and type in the default values you want?

The second combo box: Why can't you create a query and in the criteria part of click on Expression and map to the form and fields you want from the combo box? On the form you will have to have the fields that you want populate, which I assume is based on a table or query.

This doesn't seem like it should be that difficult if you use the wizard.

I am novice at this too, but that is how I create it on my forms.:D

Larry
 
Hi

i have done in the same way ..i typed the values which i want but it did not ask me for the default values..
 
I did not get u..Pls let me Know wht exactly it means
 
you said you have default values...Are they kept in a table somewhere in the database?
 
is there any way you can put a copy of your database online? that would help a lot. :)
 
Hi


I have 2 Doubts


(1) I have a combo box in the Orders form.The combo box contains list of the material names such as iron,paper etc.i manually typed all the values in the combo box.
But now my problem is that when i load the form it is not showing any value .so i want the default item as "select item" which can be viewed on the combo box before the user selects the option


(2) My other doubt was I have a Quotation in which I have a combo box which contains all the orders numbers(which are loaded from the orders table).The user after selecting the particular order number,i want the textboxes of the name and address to be filled automatically according to that particular order number..

for that to happen i wrote a query in the expression bulider of the name textbox as

=(SELECT [FullName] FROM [Order] WHERE ([OrderNo]=([Forms]![Quoatation.OrderNumber])))

but its giving #name?


Please help me out

Thank U
 
Sample DB

Okay...I just threw this together and I think this may help put you on the right track... I think.

Take a look at what I did and how I have the combo boxes looking at the queries, instead of "writing" the queries in the expression box.

Larry
 

Attachments

hi guys ,

I got the solution.

Here is the code..

Private Sub Combo7_LostFocus()
Dim db1 As DAO.Database
Dim rs1 As DAO.Recordset
Dim VbMsgBoxResult As Integer
Dim varPOBaseNumber As String
Dim intPONumber As Integer
Set db1 = CurrentDb()
Set rs1 = db1.OpenRecordset("SELECT name FROM Table1 WHERE orderno = " & Combo7.Value & " ", dbOpenSnapshot)
'Do Until rs1.EOF
'rs1.Delete
'rs1.Move 1
'Loop
Text9.Value = rs1(0)
db1.Close
Set db1 = Nothing
'rs1.Close
Set rs1 = Nothing
End Sub

Thank u very much guys
 

Users who are viewing this thread

Back
Top Bottom