A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Question for Lynn Trap



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2004, 05:21 PM
Mark
external usenet poster
 
Posts: n/a
Default Question for Lynn Trap


I have posted this message 3 times before

I have a form for ordering with a subform with all the
parts I need to order, my only problm is I need to get an
incrementing line number next to all the parts I need to
order and save it in the table under the order number.


eg. ord# 3

1 blue ring terminal
2 yellow ring terminal
etc...

so in the table orders I would like it to show
ord#3 1 blue ring terminal
ord#3 2 Yellow ring terminal
and so on and so on.


I got told you can do this with Dlookup or Dlast but I
dont know how


You help alot of people so I hope that ypou can help me.

Thanks in advance
Mark.
  #2  
Old May 27th, 2004, 06:16 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default Question for Lynn Trap

Mark,
Take a look at this website:

http://www.lebans.com/rownumber.htm

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Mark" wrote in message
...

I have posted this message 3 times before

I have a form for ordering with a subform with all the
parts I need to order, my only problm is I need to get an
incrementing line number next to all the parts I need to
order and save it in the table under the order number.


eg. ord# 3

1 blue ring terminal
2 yellow ring terminal
etc...

so in the table orders I would like it to show
ord#3 1 blue ring terminal
ord#3 2 Yellow ring terminal
and so on and so on.


I got told you can do this with Dlookup or Dlast but I
dont know how


You help alot of people so I hope that ypou can help me.

Thanks in advance
Mark.



  #3  
Old May 28th, 2004, 05:24 AM
Mark
external usenet poster
 
Posts: n/a
Default Question for Lynn Trap

Thanks for replying Lynn,

But I have been sent to this site before and (maybe its
me) I couldn't get my database to do what it says.

=RowNum([Form]).

Does the [Form] have to be the name of the form its
working in or the subform name.

The next problem is I dont think that this function stores
the LineNumber into the table. (Which is what I need)

Please save me I'm going completely crazy

-----Original Message-----
Mark,
Take a look at this website:

http://www.lebans.com/rownumber.htm

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Mark" wrote in

message
...

I have posted this message 3 times before

I have a form for ordering with a subform with all the
parts I need to order, my only problm is I need to get

an
incrementing line number next to all the parts I need to
order and save it in the table under the order number.


eg. ord# 3

1 blue ring terminal
2 yellow ring terminal
etc...

so in the table orders I would like it to show
ord#3 1 blue ring terminal
ord#3 2 Yellow ring terminal
and so on and so on.


I got told you can do this with Dlookup or Dlast but I
dont know how


You help alot of people so I hope that ypou can help me.

Thanks in advance
Mark.



.

  #4  
Old May 31st, 2004, 02:36 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default Question for Lynn Trap

Hmmmmm....storing the line number in your table is going to be a different
ball game. You'll need to write a function that gets the maximum value of
the LineNumber field for a given master record. The SQL to do that would be
something like:

Select ForeignKeyToParentTable, Max(LineNumber)
From YourChildTable
Where ForeignKeyToParentTable = Forms!YourMainForm!KeyFieldInParentTable;

If that returns a null record, then set the LineNumber to 1. Otherwise, add
1 to the value returned by Max(LineNumber);

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Mark" wrote in message
...
Thanks for replying Lynn,

But I have been sent to this site before and (maybe its
me) I couldn't get my database to do what it says.

=RowNum([Form]).

Does the [Form] have to be the name of the form its
working in or the subform name.

The next problem is I dont think that this function stores
the LineNumber into the table. (Which is what I need)

Please save me I'm going completely crazy

-----Original Message-----
Mark,
Take a look at this website:

http://www.lebans.com/rownumber.htm

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Mark" wrote in

message
...

I have posted this message 3 times before

I have a form for ordering with a subform with all the
parts I need to order, my only problm is I need to get

an
incrementing line number next to all the parts I need to
order and save it in the table under the order number.


eg. ord# 3

1 blue ring terminal
2 yellow ring terminal
etc...

so in the table orders I would like it to show
ord#3 1 blue ring terminal
ord#3 2 Yellow ring terminal
and so on and so on.


I got told you can do this with Dlookup or Dlast but I
dont know how


You help alot of people so I hope that ypou can help me.

Thanks in advance
Mark.



.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.